On Sep 4, 2012, at 2:40 PM, Matt Mower wrote:
> Hi Brian.
>
> On Tuesday, 4 September 2012 02:05:39 UTC+1, Brian Marick wrote:
> > I've been playing with it for a while and it's a great for experimentation but, and I'm not sure if this is something I'm doing wrong, it doesn't seem to run all Clojure code. I've had integer overflows that I don't get in the Lein repl as well as problems with protocol implementation that worked in Lein and gave strange exceptions in LT.
>
> Were these problems with examples or exercises from the book?
>
> No they were from another book on Clojure. The integer overflow was from defining the factorial function with the same function working correctly under Lein.
This may be a version issue. Until Clojure version 1.3, Clojure would automatically promote integer overflow to "bignums" (potentially infinite integers). In 1.3, for performance reasons, integer overflow throws an exception. You can find out which Clojure version you're running like this:
user=> *clojure-version*
{:major 1, :minor 4, :incremental 0, :qualifier nil}