3 ms·
I'd go so far as to advise aggressive use of the threading macros in order to remove visual nesting. It is much easier to read: (def good-set-of-stuff
by emidln 9y ago
I'd go so far as to advise aggressive use of the threading macros in order to remove visual nesting. It is much easier to read:
(def good-set-of-stuff
(->> stuff
(filter good?)
(map enrich)
(into #{}))
than it is to read:
(def good-set-of-stuff
(into #{}
(map enrich
(filter good? stuff))))
or
(def good-set-of-stuff (into #{} (map enrich (filter good? stuff))))
- jwdunne 9y agoWithout much Clojure experience, I agree. Sequential, what-comes-first, is easier to read than finding the first evaluated expression and peeling backwards just to build the same mental model.