Wishful Coding

Didn't you ever wish your computer understood you?

How much Clojure do you know?

How much Clojure do you know?

user=> (count (ns-publics 'clojure.core))

That are a lot of functions. Unless you wrote half of them I wager you don’t know them all. Don’t worry, neither do I. But it doesn’t hurt to learn some more. That is why I wrote a Clojure quiz.

Simply do the standard stuff(make sure you have git and lein or cake)

git clone git://github.com/pepijndevos/clojure-quiz.git
cake deps
cake repl
(use 'clojure-quiz.core)

Now you can play three types of quizzes.

  • (doc-quiz) Find the correct doc string for the given function.
  • (name-quiz-easy) Find the correct function for the given doc.
  • (name-quiz) Same as above, but without multiple choice.

(name-quiz) is by far the hardest, and I generally score around 70% while I can usually get 100% on the others.

You can tweak the quiz by using binding to set the namespace to use and the number of options to give:

(binding [target 'clojure.set number 5] (doc-quiz))

Have fun!

Pepijn de Vos