2012/5/14 Michael Rice <limitc...@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

____________________
  Racket Users list:
  http://lists.racket-lang.org/users

Reply via email to