Re: Zip function

2010-03-13 Thread Vagif Verdi
In clojure map works like zipWith. So you can pass to it vector if you want just plain zip: (map vector colls) That makes making a special named function unnesessary. On Mar 13, 6:55 am, Marmaduke wrote: > Hello, > > I'm new to Clojure, but in other languages, zip is a workhorse, and I > didn't

Re: Zip function

2010-03-13 Thread Meikel Brandmeyer
Hi, On Sat, Mar 13, 2010 at 06:55:56AM -0800, Marmaduke wrote: > I'm new to Clojure, but in other languages, zip is a workhorse, and I > didn't find it, so I > > (defn zip [& ss] > (partition (count ss) (apply interleave ss))) > > but because I didn't find it, I am suspicious: is there a bett

Zip function

2010-03-13 Thread Marmaduke
Hello, I'm new to Clojure, but in other languages, zip is a workhorse, and I didn't find it, so I (defn zip [& ss] (partition (count ss) (apply interleave ss))) but because I didn't find it, I am suspicious: is there a better way? Marmaduke ps. As a first-poster: thanks to Rich Hickey and St