|
|
|
|
|
by calibraxis
4299 days ago
|
|
Maybe it helps to simply notice that Clojure code is stored in a data format. Or it may help for you try to write a simple macro. (Macros give you extra power in extending the language, in ways which a language designer couldn't foresee. Because they're not omniscient; for your domain, you can be the expert, not them. Macros let people add paradigms-as-libraries. You may never write a macro, but you can benefit from those who do.) Now that I'm proficient, I see those parens as cute little code units. With my code editor, I operate on these code units, not just characters. In contrast, other languages seem to have lots of punctuation in all sorts of weird places. Messy. You can also use ->>: (reduce
(filter-reducer even?)
[]
(reduce
(map-reducer inc)
[]
(range 10)))
can be written more clearly: (->> (range 10)
(reduce (map-reducer inc) [])
(reduce (filter-reducer even?) []))
|
|