Clojure: What is the easiest way to remove all the nil items in a nested
data structure?
Say we have this nested vector:
(def coll [nil [["this" nil "this"] nil] nil "this"])
How would you design a remove-nil function so that all nil disappear?
(remove-nil coll)
;> [[["this" "this"]] "this"]
No comments:
Post a Comment