Comment on The Weird and Wonderful Characters of ClojureComments−emidln12yI've been using Clojure for awhile now and it has never previously occurred to me that you could do: #(foo %2) instead of (fn [_ arg2] (foo arg2)) Thanks!−yobriefcase12yNeither did I until I started writing about #( and decided to see what would happen. The joys of being nosey.−da0212yNosey? Or maybe "curious"? Explorer? Pioneer? Either way, thanks for writing about it.−moomin12yObviously, bear in mind that (comp foo second) may be preferable.−weavejester12ySlightly different use-case, as: (comp foo second) Is equivalent to: (fn [[_ x]] (foo x)) Not: (fn [_ x] (foo x))−ar7hur12y+1.How about: (comp foo second list)
Comments
I've been using Clojure for awhile now and it has never previously occurred to me that you could do:
instead of Thanks!Neither did I until I started writing about #( and decided to see what would happen. The joys of being nosey.
Nosey? Or maybe "curious"? Explorer? Pioneer? Either way, thanks for writing about it.
Obviously, bear in mind that (comp foo second) may be preferable.
Slightly different use-case, as:
Is equivalent to: Not:+1.
How about: