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.<br>
<br>
--Carl<br><br>On Sun, May 13, 2012 at 1:24 AM, Jay McCarthy <span dir="ltr"><<a href="mailto:jay.mccarthy@gmail.com" target="_blank">jay.mccarthy@gmail.com</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Sorry, I was crazy. My local doc build was busted, so it didn't show up.<br>
<br>
I've never used thunk* but I presume that it's designed for when you<br>
want to have the procedure as an argument to something like map,<br>
without trying to be arity-polymorphic yourself (which is very<br>
cumbersome for keyword procedures.)<br>
<div class="HOEnZb"><div class="h5"><br>
Jay<br>
<br>
On Sat, May 12, 2012 at 11:07 PM, Harry Spier <<a href="mailto:vasishtha.spier@gmail.com">vasishtha.spier@gmail.com</a>> wrote:<br>
> Section 3.17 Procedures in the Racket Reference manual (my local<br>
> version with the latest Racket windows version<br>
><br>
> On 5/13/12, Jay McCarthy <<a href="mailto:jay.mccarthy@gmail.com">jay.mccarthy@gmail.com</a>> wrote:<br>
>> I may be crazy, but I can't find any documentation for thunk or<br>
>> thunk*. Can you tell me where you are finding these forms, so I can<br>
>> see what they do and thus how they might be useful?<br>
>><br>
>> Jay<br></div></div></blockquote></div>