mirror of
https://github.com/justinethier/cyclone.git
synced 2025-07-15 00:37:35 +02:00
Added letrec-syntax example from r7rs
This commit is contained in:
parent
1903a87cb9
commit
7e2a9f46c2
1 changed files with 11 additions and 1 deletions
|
@ -1,4 +1,14 @@
|
|||
(import (scheme base) (scheme write))
|
||||
(import (scheme base) (scheme write) (scheme cyclone pretty-print))
|
||||
|
||||
#;(letrec-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) (let odd?) (if even?))
|
||||
(my-or x (let temp) (if y) y))) ;; ==> 7
|
||||
|
||||
(define-syntax my-let
|
||||
(syntax-rules
|
||||
|
|
Loading…
Add table
Reference in a new issue