Re: [racket-dev] [PATCH] Add a `zip' procedure to lists

2012-11-09 Thread J. Ian Johnson
] 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

Re: [racket-dev] [PATCH] Add a `zip' procedure to lists

2012-11-09 Thread Diogo F. S. Ramos
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

Re: [racket-dev] [PATCH] Add a `zip' procedure to lists

2012-11-09 Thread Vincent St-Amour
- 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

[racket-dev] [PATCH] Add a `zip' procedure to lists

2012-11-08 Thread Diogo F. S. Ramos
`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