Skip to content

Instantly share code, notes, and snippets.

@fogus
Created April 22, 2009 17:27
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 fogus/99935 to your computer and use it in GitHub Desktop.
Save fogus/99935 to your computer and use it in GitHub Desktop.
;; a bit faster flatten
(defn flatten [x]
(if (seq? x)
(lazy-seq (apply #(lazy-cat %&) (map flatten x)))
(list x)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment