Arc Forumnew | comments | leaders | submitlogin
3 points by rincewind 5754 days ago | link | parent

zip (like that in python) can be written shorter with map

  (def zip args (apply map list args))


1 point by skenney26 5754 days ago | link

And here's a better definition of unzip:

  (def unzip (xs (o n 2))
    (apply map list (tuples xs n)))

  arc> (unzip '(a b c d e f) 3)
  ((a d) (b e) (c f))

-----