[plt-scheme] How to de-structure(?) a list for a call to map?

From: Jon Rafkind (workmin at ccs.neu.edu)
Date: Mon Nov 12 00:39:16 EST 2007

Grant Rettke wrote:
> 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.
>
>   
(apply map list *rows*)


Posted on the users mailing list.