[plt-scheme] How to de-structure(?) a list for a call to map?
(apply list rows)?
Jos
((((lambda(x)((((((x x)x)x)x)x)x))
(lambda(x)(lambda(y)(x(x y)))))
(lambda(x)(write x)x))
'greeting)
----- Original Message -----
From: "Grant Rettke" <grettke at acm.org>
To: "PLT Scheme List" <plt-scheme at list.cs.brown.edu>
Sent: Monday, November 12, 2007 6:27 AM
Subject: [plt-scheme] How to de-structure(?) a list for a call to map?
> The result of a function I'm calling is a list of lists. I need to
> pass those lists in as a call to map.
>
> Here is a approximation:
>
> (define *rows* '((1 2 3) (2 3 4) (3 4 5)))
>
> Here is what I want to be able to do, though:
>
> (map list '(1 2 3) '(2 3 4) '(3 4 5))
>
> to produce
>
> ((1 2 3) (2 3 4) (3 4 5))
>
> but using the contents of *rows* instead.
>
> How would I go about doing so? I am missing the solution to this one,
> repeatedly! :)
> _________________________________________________
> For list-related administrative tasks:
> http://list.cs.brown.edu/mailman/listinfo/plt-scheme
>