mirror of
https://github.com/justinethier/cyclone.git
synced 2025-07-11 14:57:36 +02:00
New test file
This commit is contained in:
parent
50555340b1
commit
7dd0eb8591
1 changed files with 16 additions and 0 deletions
16
test-lib/test.sld
Normal file
16
test-lib/test.sld
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
(define-library (test-lib test)
|
||||||
|
(import (scheme base))
|
||||||
|
(export
|
||||||
|
my-or)
|
||||||
|
(begin
|
||||||
|
(define-syntax my-or
|
||||||
|
(er-macro-transformer
|
||||||
|
(lambda (expr rename compare)
|
||||||
|
(cond ((null? (cdr expr)) #f)
|
||||||
|
((null? (cddr expr)) (cadr expr))
|
||||||
|
(else
|
||||||
|
(list (rename 'let) (list (list (rename 'tmp) (cadr expr)))
|
||||||
|
(list (rename 'if) (rename 'tmp)
|
||||||
|
(rename 'tmp)
|
||||||
|
(cons (rename 'or) (cddr expr)))))))))
|
||||||
|
))
|
Loading…
Add table
Reference in a new issue