Skip to content

Instantly share code, notes, and snippets.

@drguildo
Created November 10, 2011 15:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save drguildo/1355050 to your computer and use it in GitHub Desktop.
Save drguildo/1355050 to your computer and use it in GitHub Desktop.
(defn flatn [xs]
(if (not (empty? xs))
(if (seq? (first xs))
(concat (flatn (first xs)) (flatn (rest xs)))
(conj (flatn (rest xs)) (first xs)))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment