repo.or.cz
/
picobit.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
history
|
raw
|
HEAD
Since we don't use closures as pairs in the stack anymore, the
[picobit.git]
/
tests
/
test-letrec.scm
blob
5a9a0005d21420180ae9ab4fc86733fe4ce647ac
1
;; (letrec ((odd? (lambda (x) (and (not (= x 0)) (even? (- x 1)))))
2
;; (even? (lambda (x) (or (= x 0) (odd? (- x 1))))))
3
;; (display (even? 2)))
4
5
(letrec ((foo (lambda (x) (if (> x 6) x (bar x))))
6
(bar (lambda (x) (foo (+ x 1)))))
7
(display (foo 1)))