3 ms·
The parent is almost certainly referring to the distinction between: (-> (initial) a b c d e) and (e (d (c (b (a (initial)))))) I find -> and ->> useful, bu
by kenko 14y ago
The parent is almost certainly referring to the distinction between:
(-> (initial) a b c d e)
and
(e (d (c (b (a (initial))))))
I find -> and ->> useful, but the new threading operators kind of silly; they're very easy to implement in terms of -> and ->>, or in terms of higher-order functions, and don't really cover all the use cases one would want---it offends my sense of aesthetics to have them (in their particular implementation) added to the core ns.
- vorg 14y ago(-> (initial) a b c d e) is like "The city on the bay in California" and (e (d (c (b (a (initial)))))) is like "The Californian bay's city". These variations are different thematic structures to language.
- pyrtsa 14y agoIn my view it's exactly the opposite: (-> (california) bay-in city-on) ; "The Californian bay's city" vs. (city-on (bay-in (california))) ; "The city on the bay in California" The former ("->") starts with what's fed into the pipeline, the latter starts with what you get out of it. In addition, "->" avoids the nesting of expressions regardless of the number of steps, which might be useful in some cases. But both styles have their place.