April 2012
Intermediate to advanced
296 pages
7h 3m
English
As a Clojure programmer, one question you will often ask is, “Where do I need state to solve this problem?” Or, better yet, “How much of this problem can I solve without using any state?”
With Clojurebreaker (and with many other games), the game logic itself is a pure function. It takes a secret and a guess and returns a score. Identifying this fact early gives us two related advantages:
Scoring itself divides into two parts: tallying the exact matches and tallying the matches that are out of order. Each of these parts can be its own ...
Read now
Unlock full access