rec[syntax] rec var exp
[syntax] rec (name . variables) body
SRFI-31: creates recursive function.
(define-syntax rec
(syntax-rules ()
((rec (NAME . VARIABLES) . BODY)
(letrec ( (NAME (lambda VARIABLES . BODY)) ) NAME))
((rec NAME EXPRESSION)
(letrec ( (NAME EXPRESSION) ) NAME))))
ChezScheme: Creates a recursive object.
(define-syntax rec
(syntax-rules ()
((_ x e) (letrec ((x e)) x))))
See also letrec.
MIT-Scheme has named-lambda, which is equivalent to the second form
of rec.
|