<br><div class="gmail_quote">On Fri, Nov 20, 2009 at 17:14, Carl Eastlund <span dir="ltr"><<a href="mailto:carl.eastlund@gmail.com" target="_blank">carl.eastlund@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div>On Fri, Nov 20, 2009 at 10:55 AM, Joe Marshall <<a href="mailto:jmarshall@alum.mit.edu" target="_blank">jmarshall@alum.mit.edu</a>> wrote:<br>
> On Fri, Nov 20, 2009 at 5:57 AM, Laurent <<a href="mailto:laurent.orseau@gmail.com" target="_blank">laurent.orseau@gmail.com</a>> wrote:<br>
>><br>
>> I have the following (simplified) code :<br>
>><br>
>> (define (f1 x)<br>
>> (let ([y (foo x)])<br>
>> (bar x y y)<br>
>> (plop y x y)<br>
>> (baz x y)))<br>
>><br>
>> (define (f2 x)<br>
>> (let ([y (foo x)])<br>
>> (baz x y)))<br>
><br>
> (define (wrapper receiver)<br>
> (lambda (x)<br>
> (let ((y (foo x)))<br>
> (receiver x y)<br>
> (baz x y))))<br>
><br>
> (define f1<br>
> (wrapper<br>
> (lambda (x y)<br>
> (bar x y y)<br>
> (plop y x y) )))<br>
><br>
> (define f2<br>
> (wrapper<br>
> (lambda (x y) #f)))<br>
<br>
</div>Oops. Joe, of course, has the best solution. No need for "macrology"<br>
when "functionality" does the job. Pardon the puns.<br></blockquote><div><br>But this introduces a (little?) run-time cost, doesn't it?<br></div></div><br>