Is there any sort of zip
& unzip
functions for lists built into Racket? Or a fairly standard extra package that includes them? I have a particular use for an unzip right now. While I could quite easily write my own function, it’s the sort of thing that I think in practice it is better to use from elsewhere if there’s a ‘standard’ version of it.
Oh, no, I’m not talking about working with zip files - just something akin to e.g. https://msdn.microsoft.com/visualfsharpdocs/conceptual/list.unzip%5b%27t1%2c%27t2%5d-function-%5bfsharp%5d
@jcoo092 zip is (map list xs ys)
It’s in srfi/1 btw.
So are unzip1, …, unzip5
I’d prefer (map first ziped-list)
over unzip1
though.
@jcoo092 in general you don’t need zip
because map
takes multiple list arguments.
Thanks @spdegabrielle, @soegaard2 & @samth :slightly_smiling_face:
Found a series of video lectures based on HtDP. https://www.youtube.com/channel/UC7dEjIUwSxSNcW4PqNRQW8w