Guest User

Untitled

a guest
Jun 29th, 2018
150
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. (fn [seq n]
  2.     (loop [acc (vec (repeat n nil)) i 0 tail seq]
  3.         (let [i' (mod i n)]
  4.             (cond (empty? tail) (apply list acc)
  5.                   :else         (recur (assoc acc i' (concat (nth acc i') (list (first tail)))) (+ i 1) (rest tail))))))
Add Comment
Please, Sign In to add comment