[racket] Uses of thunk*

From: Laurent (laurent.orseau at gmail.com)
Date: Wed May 16 16:23:30 EDT 2012

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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20120516/75ee2c12/attachment.html>

Posted on the users mailing list.