---
# System prepended metadata

title: Untitled

---

```
(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)
```