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 adoptopenjdk
brew 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 thedescribe
and the description as theit
- Add any restricted functions using
with-restrictions
(Note: functions with:inline
meta, likenth
, can't be redeffed, sowith-restrictions
may not always work) - Add the assertions as the
should
(s), replacing the underscores with a function named as the problem number
$ script/restart
if you want to start from scratch- Add your function to
fourclojure.core
- Run the specs
$ lein spec -a