Advertisement
Guest User

Untitled

a guest
Nov 22nd, 2014
187
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. (defn flat [n]
  2.   (let [[x & xs] n]
  3.     (cond
  4.      (empty? n) '()
  5.      (coll? x) (concat (flat x) (flat xs))
  6.      :else (cons x (flat xs)))))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement