MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/Clojure/comments/6d3w8i/readable_clojure/di7wqjd/?context=3
r/Clojure • u/[deleted] • May 24 '17
31 comments sorted by
View all comments
Show parent comments
6
In this case, #(-> % trim capitalize) seems really natural to me. You don't necessarily need comp to invert order of control.
#(-> % trim capitalize)
I think I may prefer
(map #(-> % :number inc) maps)
to both of your options.
2 u/amoe_ May 25 '17 I find it useful to define comp-> for this case. 1 u/JW_00000 May 29 '17 Does this mean comp-> is equivalent to comp with the arguments reversed? 2 u/amoe_ May 30 '17 Yep
2
I find it useful to define comp-> for this case.
comp->
1 u/JW_00000 May 29 '17 Does this mean comp-> is equivalent to comp with the arguments reversed? 2 u/amoe_ May 30 '17 Yep
1
Does this mean comp-> is equivalent to comp with the arguments reversed?
comp
2 u/amoe_ May 30 '17 Yep
Yep
6
u/bliow May 25 '17
In this case,
#(-> % trim capitalize)seems really natural to me. You don't necessarily need comp to invert order of control.I think I may prefer
to both of your options.