secret
Created

  • Download Gist
all-pairs.clj
Clojure
1 2 3 4 5 6
(defn all-pairs [coll]
(let [x (first coll) xs (next coll)]
(when xs
(lazy-cat
(map (fn [y] [x y]) xs)
(all-pairs xs)))))

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.