at the very least, he may use a fac-simile<div><br></div><div><div><font class="Apple-style-span" face="'courier new', monospace">(define (for/list from to f)</font></div><div><font class="Apple-style-span" face="'courier new', monospace"> (if (> from to) '()</font></div>
<div><font class="Apple-style-span" face="'courier new', monospace"> (cons (f from)</font></div><div><font class="Apple-style-span" face="'courier new', monospace"> (for/list (+ 1 from) to f))))</font></div>
<div><font class="Apple-style-span" face="'courier new', monospace"><br></font></div><div><font class="Apple-style-span" face="'courier new', monospace">(define (id x) x)</font></div><div><font class="Apple-style-span" face="'courier new', monospace">(define (double n) (+ n n))</font></div>
<div><font class="Apple-style-span" face="'courier new', monospace">(define (fact n) (apply + (for/list 1 n id)))</font></div><div><font class="Apple-style-span" face="'courier new', monospace"><br></font></div>
<div><font class="Apple-style-span" face="'courier new', monospace">(for/list 1 10 double)</font></div><div><font class="Apple-style-span" face="'courier new', monospace">(for/list 1 10 fact)</font></div><div>
<font class="Apple-style-span" face="'courier new', monospace">(for/list 1 10 (lambda (n) (cons n (fact (double n)))))</font></div><div><br></div><div>teach the kid fold and map too... ;)</div><br><div class="gmail_quote">
On Fri, Apr 20, 2012 at 12:30 AM, John Clements <span dir="ltr"><<a href="mailto:clements@brinckerhoff.org">clements@brinckerhoff.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Is WeScheme pinned on beginner for a while? My son is interested in writing a simple turn-based RPG in WeScheme---something it seems admirably suited for, by and large--but I'm dying for things like for/list. Am I missing a simple switch that would allow me to use other language levels? The expansion-based structure of racket suggests that the full racket language could be hiding underneath. No?<br>
<span class="HOEnZb"><font color="#888888"><br>
John<br>
<br>
</font></span><br>____________________<br>
Racket Users list:<br>
<a href="http://lists.racket-lang.org/users" target="_blank">http://lists.racket-lang.org/users</a><br>
<br></blockquote></div><br></div>