Skip to content

Instantly share code, notes, and snippets.

Created December 8, 2011 06:16
Show Gist options
  • Save anonymous/1446266 to your computer and use it in GitHub Desktop.
Save anonymous/1446266 to your computer and use it in GitHub Desktop.
;; flengyel's solution to Flatten a Sequence
;; https://4clojure.com/problem/28
(fn flat [L] (reduce #(if (coll? %2) (vec (concat %1 (flat %2))) (conj %1 %2)) [] L))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment