Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
14 lines (12 sloc) 251 Bytes
; P07 Flatten a nested list structure.
; Predefined functions
(defn f0 [l]
(flatten l))
; Recursion
(defn f1 [l]
(if (seq l)
(let [h (first l) t (rest l)]
(if (list? h)
(concat (f1 h) (f1 t))
(cons h (f1 t))))
'()))