A leiningen plugin which given a problem from 4clojure will populate the current project's tests with the problem's tests.
This plugin only works with, the now outdated, leiningen v1, for a leiningen plugin that works with v2 see lein-fore-prob.
lein plugin install foreclojure-plugin 0.0.1
lein new probs-from-4clj
cd probs-from-4clj
lein fore-prob PROBLEMID
Given a new project like this:
$ tree -A
.
├── classes
├── project.clj
├── README
├── src
│ └── probs_from_4clj
│ └── core.clj
└── test
└── probs_from_4clj
└── test
└── core.clj
A stub function will be added to src/probs_from_4clj/core.clj
e.g for
problem 98 a equivalence-classes-solution
function is defined. Then in
test/probs_from_4clj/test/core.clj
the tests for that problem will be added
e.g again for problem 98 the test would be can-equivalence-classes
. At
that point you can flesh out the function until the test passes then copy
it over to http://4clojure.org when you're happy with it.
Copyright (C) 2011 Dan Brook
Distributed under the Eclipse Public License, the same as Clojure.