] Add a `zip' procedure to lists
`zip' gathers together each element of each list, in order, returning
a list of those elements.
For example: (zip (list 4 2) (list 3 5)) = '((4 3) (2 5))
Every list has to have the same length.
---
There was talk in the IRC about implementing a `zip' procedure. Here
J. Ian Johnson i...@ccs.neu.edu writes:
zip is unnecessary because of n-ary map.
(zip l0 l1) = (map list l0 l1)
Indeed. And that's how I did it.
But I think `zip' is explicit with the intent.
_
Racket Developers list:
http://lists.racket-lang.org/dev
- Original Message -
From: Diogo F. S. Ramos diogo...@gmail.com
To: dev@racket-lang.org
Sent: Thursday, November 8, 2012 11:46:15 PM GMT -05:00 US/Canada Eastern
Subject: [racket-dev] [PATCH] Add a `zip' procedure to lists
`zip' gathers together each element of each list, in order, returning
`zip' gathers together each element of each list, in order, returning
a list of those elements.
For example: (zip (list 4 2) (list 3 5)) = '((4 3) (2 5))
Every list has to have the same length.
---
There was talk in the IRC about implementing a `zip' procedure. Here
is my try.
Unfortunately I
4 matches
Mail list logo