``` (define (all-paths t all) (cond ; [(empty? (node-children t)) (append (cons (node-children t) empty) all)] [else (foldr (lambda (h ta) (list (fst (node-children t)) (fst h) (all-paths (snd ta) all))))] )) ``` ``` (define (paths t) (foldr (lambda (child ps) (append (map (lambda (p) (cons (fst child) p)) (paths (snd child))) ps)) null (children t) ```
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up