Re:Functional-navigational programming in Clojure with Specter
by tel on Tuesday September 29, 2015 @12:15PM
(#10297356)
Walk shows up quite often in the "uniplate" functionality of Haskell's `lens`. It's really, really useful for handling AST transformations, but depends a bit on laziness here.
(select (walker number?) {2 [1 2 [6 7]] :a 4 :c {:a 1 :d [2 nil]}})
=> [2 1 2 1 2 6 7 4]
I've personally found this to be a use case that comes up infrequently.