[racket] λ vs lambda

From: Grant Rettke (grettke at acm.org)
Date: Mon May 14 11:25:42 EDT 2012

Can we hack DrRacket to display a lambda instead of the word lambda like
pretty-mode in emacs?

On Mon, May 14, 2012 at 10:23 AM, Ray Racine <ray.racine at gmail.com> wrote:

> 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
>>
>>
>
> ____________________
>  Racket Users list:
>  http://lists.racket-lang.org/users
>
>


-- 
http://www.wisdomandwonder.com/
ACM, AMA, COG, IEEE
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20120514/011c7d0a/attachment.html>

Posted on the users mailing list.