[plt-scheme] Re: "Zipping" two lists?

From: Carl Eastlund (carl.eastlund at gmail.com)
Date: Thu Feb 23 14:26:58 EST 2006

On 2/23/06, Jed Davis <jdev at panix.com> wrote:
> But if you still want a zip function, I suggest:
> (define (zip . ls) (apply map (cons list ls)))
> ; Makes for a nice demonstration of apply, too.

As Eli demonstrated in his response, apply has foreseen this need, and
thus (apply map list ls) will do the same thing with no need for cons.

Carl Eastlund
"Cynical, but technically correct."

Posted on the users mailing list.