<p dir="ltr">This is what 'in-value' is for.</p>
<p dir="ltr">Sam</p>
<div class="gmail_quote">On Aug 17, 2014 5:07 AM, "Mark Wallace" <<a href="mailto:lotabout@gmail.com">lotabout@gmail.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Consider the following pseudocode:<br>
<br>
(for/list ([i ...]<br>
#:when <very complecated expr E>)<br>
<reference to the above expr E>)<br>
<br>
Can I bind that expression E and reference in the body of "for/list"?<br>
<br>
If expression E takes lots of time to finish, we would not want to compute it again :).<br>
<br>
I understand that there are workarounds like first collect all items of expression E and then use 'filter' to get interested items. However it would be a waste of memory if the number of interested items is small.<br>
<br>
So, any ideas?<br>
<br>
-- <br>
Best Regards,<br>
Mark Wallace.<br>
____________________<br>
Racket Users list:<br>
<a href="http://lists.racket-lang.org/users" target="_blank">http://lists.racket-lang.org/<u></u>users</a><br>
</blockquote></div>