clean up code
This commit is contained in:
parent
85db821ad2
commit
7af2f1e11d
|
@ -1,7 +1,7 @@
|
|||
(define-library (picrin syntax-rules)
|
||||
(import (scheme base)
|
||||
(scheme cxr)
|
||||
(picrin macro)
|
||||
(scheme write))
|
||||
(picrin macro))
|
||||
|
||||
;;; utility functions
|
||||
(define (reverse* l)
|
||||
|
@ -318,18 +318,4 @@
|
|||
|
||||
`(,_syntax-error "malformed syntax-rules"))))))
|
||||
|
||||
;;; test code
|
||||
(import (scheme write))
|
||||
|
||||
(define-syntax hoge
|
||||
(syntax-rules ()
|
||||
((hoge (a ...) ...) '((a ...) ...))
|
||||
((hoge (a b) ...) '(a ...))
|
||||
((hoge a b ... c . d) 'c)))
|
||||
|
||||
(display (hoge (1 2 3) (3 4 5) (5 6 7)))
|
||||
(newline)
|
||||
(display (hoge (a b) (c d) (e f)))
|
||||
(newline)
|
||||
(display (hoge a b c))
|
||||
(newline)
|
||||
(export syntax-rules))
|
||||
|
|
Loading…
Reference in New Issue