Problems from 4clojure, tested with Speclj.
For when you want to do some 4clojure problems, but don't want to write the code in the browser.
Using homebrew:
brew cask install adoptopenjdkbrew install leiningen
If the problem you want to solve isn't tested in fourclojure.core-spec yet:
- Find the problem on 4clojure
- Add the spec to
fourclojure.core-spec, using the number as thedescribeand the description as theit - Add any restricted functions using
with-restrictions(Note: functions with:inlinemeta, likenth, can't be redeffed, sowith-restrictionsmay not always work) - Add the assertions as the
should(s), replacing the underscores with a function named as the problem number
$ script/restartif you want to start from scratch- Add your function to
fourclojure.core - Run the specs
$ lein spec -a