r/Clojure • • May 24 '17

Readable Clojure

http://tonsky.me/blog/readable-clojure/
94 Upvotes

31 comments sorted by

View all comments

Show parent comments

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

(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?