[racket] Uses of thunk*

From: Carl Eastlund (cce at ccs.neu.edu)
Date: Wed May 16 16:13:54 EDT 2012

 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.


On Sun, May 13, 2012 at 1:24 AM, Jay McCarthy <jay.mccarthy at gmail.com>wrote:

> Sorry, I was crazy. My local doc build was busted, so it didn't show up.
> I've never used thunk* but I presume that it's designed for when you
> want to have the procedure as an argument to something like map,
> without trying to be arity-polymorphic yourself (which is very
> cumbersome for keyword procedures.)
> Jay
> On Sat, May 12, 2012 at 11:07 PM, Harry Spier <vasishtha.spier at gmail.com>
> wrote:
> > Section 3.17 Procedures in the Racket Reference manual (my local
> > version with the latest Racket windows version
> >
> > On 5/13/12, Jay McCarthy <jay.mccarthy at gmail.com> wrote:
> >> I may be crazy, but I can't find any documentation for thunk or
> >> thunk*. Can you tell me where you are finding these forms, so I can
> >> see what they do and thus how they might be useful?
> >>
> >> Jay
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20120516/5ef43285/attachment-0001.html>

Posted on the users mailing list.