[plt-scheme] Outer-inner loops in Scheme?

From: Robby Findler (robby at cs.uchicago.edu)
Date: Mon May 14 10:48:18 EDT 2007

Just make the lists in backwards order ...

> (build-list 10 (lambda (x) (- 10 x)))
(10 9 8 7 6 5 4 3 2 1)

Robby

On 5/14/07, Grant Rettke <grettke at acm.org> wrote:
> > Do you mean this:
> >
> > ;; Pretty Big
> > (define (test)
> >    (define range (build-list 10 identity))
> >    (for-each (lambda (x) (for-each (lambda (y) (printf "~a ~a\n" x
> > y)) range)) range))
>
> Yes.
>
> Now, how does one run through those list (in a similar manner) but backwards:
>
> http://projecteuler.net/index.php?section=problems&id=4
>
> ?
> _________________________________________________
>   For list-related administrative tasks:
>   http://list.cs.brown.edu/mailman/listinfo/plt-scheme
>


Posted on the users mailing list.