News for hackers. Stuff that matters.
Re:Learning Clojure: comparing with Java streams by cgrand-net on Sunday November 04, 2018 @03:23PM (#18377897)
Flatten is a steam-roller and should be used wisely: it recursively flatten a sequential collection. Most of the time this is not what you want. Most of the rest of the time when you think that’s what you want it’s a code smell telling you that the shape of your items has gone out of control. And there’s the rare occurrence where you can really use it.
Re:Learning Clojure: comparing with Java streams by Sharlin on Sunday November 04, 2018 @06:36PM (#18378678)
Oops, indeed. Didn’t realize that Clojure flatten is recursive.