Tell me more ×
Programming Puzzles & Code Golf Stack Exchange is a question and answer site for programming puzzle enthusiasts and code golfers. It's 100% free, no registration required.

What are your tips for code golfing using Clojure?

The aim of this question is to collect a list of techniques that are specific to Clojure and can be used in general code-golfing problems.

share|improve this question

1 Answer

Strings can be treated as a sequence of chars

e.g. to sort the characters in a string alphabetically:

(sort "hello")
=> (\e \h \l \l \o)
share|improve this answer
Strings are by definition a sequence of chars in almost every language, but you can't apply this trick in all of them :-) – mellamokb Jun 12 '11 at 21:44
1  
Or rather, "sequence" has a special meaning in Clojure than means you can apply extra tricks ::-) – mikera Jun 13 '11 at 11:24

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.