Reputation: 106351
I'm looking for enlightening examples of concise and elegant code in Clojure - mainly to learn new techniques and improve my own style.
Can you offer any nuggets of pure genius?
Upvotes: 10
Views: 4116
Reputation: 10318
This is fun:
(= (sort "eleven plus two") (sort "twelve plus one"))
This evaluates to true because "eleven plus two" is an anagram of "twelve plus one"
More fun than useful.
Upvotes: 7
Reputation: 66837
Basically everything Nurullah Akkaya posts:
Definitely some of the most imaginative Clojure examples around. Don't blame me for all the time you'll spend reading his stuff... ;-)
Upvotes: 12