mirror of
https://github.com/justinethier/cyclone.git
synced 2025-07-11 23:07:36 +02:00
Added a debug version of the letrec-syntax macro
This commit is contained in:
parent
d2e6139e5b
commit
9ebd079c8b
1 changed files with 13 additions and 0 deletions
|
@ -1,5 +1,18 @@
|
||||||
(import (scheme base) (scheme write) (scheme cyclone pretty-print))
|
(import (scheme base) (scheme write) (scheme cyclone pretty-print))
|
||||||
|
|
||||||
|
(let-syntax
|
||||||
|
((my-or (syntax-rules ()
|
||||||
|
((my-or) #f)
|
||||||
|
((my-or e) e)
|
||||||
|
((my-or e1 e2 ...)
|
||||||
|
(let ((temp e1)) (if temp temp (my-or e2 ...)))))))
|
||||||
|
(let ((x #f)
|
||||||
|
(y 7)
|
||||||
|
(temp 8)
|
||||||
|
(my-let odd?)
|
||||||
|
(my-if even?))
|
||||||
|
(my-or x (my-let temp) (my-if y) y))) ;; ==> 7
|
||||||
|
|
||||||
#;(letrec-syntax
|
#;(letrec-syntax
|
||||||
((my-or (syntax-rules ()
|
((my-or (syntax-rules ()
|
||||||
((my-or) #f)
|
((my-or) #f)
|
||||||
|
|
Loading…
Add table
Reference in a new issue