Hi,
yes, better than my solution. :) Wrapping the with-bindings around
the run-tests I can drop the namespace switch.
(with-bindings {#'clojure.contrib.mock/report-problem #'my-report-
problem}
(run-tests))
The only issue left is that when running the test with leiningen
("lein test") I don't
Hi Kevin,
On 20 Mrz., 00:34, Kevin Downey wrote:
> why are you def'ing your functions in the mock namespace? why are you
> juggling namespaces at all?
Because clojure.contrib.mock says so. The only way that worked for me
was switching the namespace. Without switching the namespace I get:
Name c
Hi,
I trying to use clojure.contrib.mock. It says to override the function
report-problem to
integrate it into other test framework like clojure.test.
I've got this working, but the namespace switching looks a bit ugly.
Is there a better
way to handle this? Maybe something like
(ns clojure.contr
Hi,
I'm trying to wrap the apfloat (arbitrary precision float,
http://www.apfloat.org/apfloat_java)
java library for a small project.
The idea is that the parameters of apfloat calculations get
automatically converted to the
Apfloat class.
My test function is sqrtf (square root float) and the au
Hi,
there is an example in programming clojure (Chapter 2.6, Where is my
for loop? on page 52)
that I don't really get.
(defn index-filter [pred coll]
(when pred
(for [[idx elt] (indexed coll) :when (pred elt)] idx)))
The explanation in the book explains the for/:when but not the
when. ;)
On 12 Feb., 01:34, Timothy Pratley wrote:
> On 12 February 2010 03:19, Martin Hauner wrote:
>
> > I'm mostly interested if there is anything in my code one would/should
> > never do that way.
>
> Looks excellent, you've aced it!
Thanks :-)
> I'd like t
Hi Brandon,
On 11 Feb., 19:59, Brenton wrote:
> Martin,
>
> It's very simple, I like it.
>
> There two things that stand out to me, both having to do with
> readabiliby.
>
> Instead of using (def score) you should use (declare score). declare
> exists for the purpose of making forward declaration
Hi,
I'm doing my first steps in Clojure and I would like to get some
feedback on my implementation of the Bowling Game Kata. The code is
here http://softnoise.wordpress.com/2010/02/07/the-bowling-kata-in-clojure.
I can post the code here if that's preferred.
I'm mostly interested if there is anyt