June 27, 2014

Clojure Koans

Clojure Koans (http://clojurekoans.com) are exercises that test your knowledge of Clojure.


Getting the code and running it is pretty straightforward.

1. Get the code from Github :
$ git clone git://github.com/functional-koans/clojure-koans.git

2. Run
$ lein koan run

(assumes that you have leiningen set up already)

After the first run, you see an exception in the first source code "01_equalities". You solve one by one and it gets progressively tougher. It is like solving a puzzle.

What I realized is that the first few exercise are pretty easy that you can solve with basic knowledge of Clojure. But as things progress, you'd have to lookup clojure functions online, understand them and then do the exercises.

My thought is to read through a book on Clojure (since I prefer reading than listening to a 1 hr video) and then come back to these exercises.

There are lot of Youtube videos that walkthrough how to solve the problems and there are github repositories of solutions. But better not look at any of them.

No comments:

Post a Comment