[racket] Other language levels in WeScheme?

From: namekuseijin (namekuseijin at gmail.com)
Date: Fri Apr 20 13:30:26 EDT 2012

at the very least, he may use a fac-simile

(define (for/list from to f)
  (if (> from to) '()
      (cons (f from)
            (for/list (+ 1 from) to f))))

(define (id x) x)
(define (double n) (+ n n))
(define (fact n) (apply + (for/list 1 n id)))

(for/list 1 10 double)
(for/list 1 10 fact)
(for/list 1 10 (lambda (n) (cons n (fact (double n)))))

teach the kid fold and map too... ;)

On Fri, Apr 20, 2012 at 12:30 AM, John Clements
<clements at brinckerhoff.org>wrote:

> 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?
>
> John
>
>
> ____________________
>  Racket Users list:
>  http://lists.racket-lang.org/users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20120420/b821f332/attachment.html>

Posted on the users mailing list.