On Feb 24, 2009, at 5:42 PM, Timothy Pratley wrote:
>
> user=> (remove nil? '(:a nil nil :b :a))
> (:a :b :a)
>
>
C'mon! Doesn't anybody do things the old-fashioned way anymore?
(defn kill-nil
([l] (kill-nil l '()))
([l result] (cond (nil? l) (reverse result)
(nil? (first l)) (recur (rest l) result)
true (recur (rest l) (cons (first l) result)))) )
You young whipper snappers!
Aloha,
David Sletten
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---