[racket] λ vs lambda

From: Ray Racine (ray.racine at gmail.com)
Date: Mon May 14 11:23:58 EDT 2012

R5RS does not specify 'λ'.  It's just another character like 'A' or 'a'.
In Racket, the language, λ and lambda are equivalent.

On Mon, May 14, 2012 at 11:09 AM, Michael Rice <limitcase at gmail.com> wrote:

> 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?
>
> Michael
>
> =============
>
> From page 91 in SICP (slightly modified):
>
> (define kons (λ (x y)
>     (define dispatch (λ (m)
>         (cond ((= m 0) x)
>               ((= m 1) y)
>               (else (error "Argument not 0 or 1 -- KONS" m)))))
>     dispatch))
>
> (define (kar z)
>     (z 0))
>
> (define (kdr z)
>     (z 1))
>
>
> ____________________
>  Racket Users list:
>  http://lists.racket-lang.org/users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20120514/246649e1/attachment.html>

Posted on the users mailing list.