]> Witch of Git - ivy/blob - program.vy
Add support for globals which don't get captured
[ivy] / program.vy
1 (let ([nil (lam (c n) (n))]
2 [cons (lam (x y) (lam (c n) (c x y)))]
3 [fix (lam (f) (f f))]
4 [if (lam (c t f) ((c t f)))])
5 ([fix (lam (recur a b l n)
6 (if (<= n 0)
7 [lam () l]
8 [lam () (recur b (+ a b) (cons a l) (- n 1))]))]
9 0 1 nil 20))