scsh-0.6/scheme/srfi/srfi-31.scm

10 lines
246 B
Scheme
Raw Normal View History

2003-02-28 08:05:04 -05:00
; Taken directly from the SRFI document.
(define-syntax rec
(syntax-rules ()
((rec (NAME . VARIABLES) . BODY)
(letrec ( (NAME (lambda VARIABLES . BODY)) ) NAME))
((rec NAME EXPRESSION)
(letrec ( (NAME EXPRESSION) ) NAME))))