The screenshots above show off complete working solutions to some CodeCombat levels, and Clojure's expressivity really shines in a few of them (Molotov Medic, Gold Rush, Find the Spy).
Clojure, the language:
Clojure is a dialect of the Lisp programming language. It has many features geared towards making it easy to reason about complex code: things like favoring functional programming over procedural code, persistent data structures, special constructs for concurrent programming, and Lisp macros for cases when a solution is best expressed in terms of the problem domain rather than having to be twisted to fit the programming language. It also has interop features for easy two-way interaction with Java code, enabling the use of thousands of established Java libraries.
Closer, the parser:
- Special forms
- loop / recur
- Persistent data structures (courtesy mori)
- Destructuring forms
- Anonymous function literals
- More than 100 functions from clojure.core
- Many of the core functions can work with lazy sequences, like
- In loose mode, the parser can handle common syntax errors (missing / excess parentheses at the end, etc.) and will always return a valid AST, even if empty, similar to Acorn's loose mode