[racket] Uses of thunk*

From: Jay McCarthy (jay.mccarthy at gmail.com)
Date: Thu May 17 15:17:40 EDT 2012

That function can't receive any keyword arguments.

Jay

On Wed, May 16, 2012 at 2:23 PM, Laurent <laurent.orseau at gmail.com> wrote:
>
>
> On Wed, May 16, 2012 at 10:13 PM, Carl Eastlund <cce at ccs.neu.edu> wrote:
>>
>> I originally wrote thunk* for cases like the callback initialization
>> argument of button%.  It expects a function of two arguments that performs
>> an effect, but I don't think I've ever used either argument in the
>> function's body.  Rather than writing (lambda (x y) e ...) with x and y
>> never used, I prefer to write (thunk* e ...) which makes it explicit that
>> any arguments are irrelevant and avoids binding unused names.
>
>
> Personally, I generally use (λ _ e ....) for that purpose (it's even
> shorter), but it does bind the `_' identifier.
>
> Laurent
>
> ____________________
>  Racket Users list:
>  http://lists.racket-lang.org/users
>



-- 
Jay McCarthy <jay at cs.byu.edu>
Assistant Professor / Brigham Young University
http://faculty.cs.byu.edu/~jay

"The glory of God is Intelligence" - D&C 93


Posted on the users mailing list.