renaming export in d-lambda
This commit is contained in:
parent
f37c2c25f7
commit
b0b60d3f01
|
@ -1,11 +1,10 @@
|
||||||
(define-library (picrin experimental lambda)
|
(define-library (picrin experimental lambda)
|
||||||
(import (rename (scheme base)
|
(import (scheme base)
|
||||||
(lambda lambda%))
|
|
||||||
(picrin macro))
|
(picrin macro))
|
||||||
|
|
||||||
(define-syntax bind
|
(define-syntax bind
|
||||||
(ir-macro-transformer
|
(ir-macro-transformer
|
||||||
(lambda% (form inject compare)
|
(lambda (form inject compare)
|
||||||
(let ((formal (car (cdr form)))
|
(let ((formal (car (cdr form)))
|
||||||
(value (car (cdr (cdr form))))
|
(value (car (cdr (cdr form))))
|
||||||
(body (cdr (cdr (cdr form)))))
|
(body (cdr (cdr (cdr form)))))
|
||||||
|
@ -27,11 +26,11 @@
|
||||||
,@body)
|
,@body)
|
||||||
(error "match failure" ,value ',formal))))))))
|
(error "match failure" ,value ',formal))))))))
|
||||||
|
|
||||||
(define-syntax lambda
|
(define-syntax destructuring-lambda
|
||||||
(ir-macro-transformer
|
(ir-macro-transformer
|
||||||
(lambda% (form inject compare)
|
(lambda (form inject compare)
|
||||||
(let ((args (car (cdr form)))
|
(let ((args (car (cdr form)))
|
||||||
(body (cdr (cdr form))))
|
(body (cdr (cdr form))))
|
||||||
`(lambda% formal# (bind ,args formal# ,@body))))))
|
`(lambda formal# (bind ,args formal# ,@body))))))
|
||||||
|
|
||||||
(export lambda))
|
(export (rename destructuring-lambda lambda)))
|
||||||
|
|
Loading…
Reference in New Issue