From: Jens Axel Søgaard (jensaxel at soegaard.net) Date: Mon May 14 13:19:44 EDT 2012 |
|
2012/5/14 Michael Rice <limitcase at gmail.com>: > The code below (kons) gets flagged in R5RS: > > define: not allowed in an expression context in: (define dispatch (λ (m) > (cond ((= m 0) x) ((= m 1) y) (else (error "Argument not 0 or 1 -- KONS" > m))))) > > Works fine if I replace the lambda symbols with "lambda". > > Cause? Insert this macro definition at the top of your R5RS code. (define-syntax λ (syntax-rules () ((_ . more) (lambda . more)))) -- Jens Axel Søgaard
Posted on the users mailing list. |
|