]> Witch of Git - ivy/blob - ivy-examples/print-n.vy
[rt] Improve memory ordering of incref/decref
[ivy] / ivy-examples / print-n.vy
1 (let (
2 [fix (lam (f)
3 (let ([t (lam (x) (f (lam (v) (x x v))))])
4 (t t)))]
5 [printn [fix (lam (recur n)
6 (((<= n 0)
7 (lam () 0)
8 (lam () (recur (- (debug n) 1))))))]]
9 ) (printn 13))