3 ms·
Clojure has that, it's called as->, and you specify a symbol to represent the previous result in each subform. But the first/last variants, -> and ->>, are sti
by KingMob 8y ago
Clojure has that, it's called as->, and you specify a symbol to represent the previous result in each subform.
But the first/last variants, -> and ->>, are still useful because they fit a subtle design decision in Clojure. Fns that operate on objects/scalars tend to have the object modified as the very first parameter, while collection-operating fns tend to have the collection last.