https://gist.github.com/mchampine/dca965226148dfd19d5e4d7f3d...
Most of it was done for a weekly Clojure programming challenge run by Eric Normand in his PurelyFunctional.tv newsletter. You can see all the entries at https://gist.github.com/ericnormand/fbc9b6386a66c1ece590930d...