[plt-scheme] PLT's lambda substituting for native case-lambda
I am very pleased with the current lambda of PLT (latest svn)
There is one thing I am missing: keyword arguments that matter only for
being present or not present in the call.
For example
(define fun (lambda (#:keyword (id present-value-expr absent-value-expr))
id))
(fun) --> value of absent-value-expr
(fun #:keyword) --> value of present-value-expr
In many cases the present-value-expr will be #t and the absent-value-expr
#f, so these might be defaults in #:keyword (id)
Just a suggestion
Jos
----- Original Message -----
From: "Eli Barzilay" <eli at barzilay.org>
To: "soo" <tilde at tilde.co.kr>
Cc: <plt-scheme at list.cs.brown.edu>
Sent: Wednesday, May 28, 2008 6:56 AM
Subject: Re: [plt-scheme] PLT's lambda substituting for native case-lambda
> On May 28, soo wrote:
>> Hi,
>> I'd like to suggest substituting lambda for case-lambda.
>
> That's not possible -- `case-lambda' is the primitive function form
> that is used by `lambda' when you use optional arguments.
>
> --
> ((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay:
> http://www.barzilay.org/ Maze is Life!
> _________________________________________________
> For list-related administrative tasks:
> http://list.cs.brown.edu/mailman/listinfo/plt-scheme