Re: Euler 40

2011-02-16 Thread Benny Tsai
Hi Andreas, I recently discovered a wiki of Clojure Euler solutions, thought you might be interested: http://clojure-euler.wikispaces.com/ On Feb 16, 1:15 am, Andreas Kostler wrote: > Thanks for everyone who commented on my solution for Euler 28 yesterday. > Euler 40 is a bit easier, even more

Re: Euler 40

2011-02-16 Thread Benny Tsai
Hi Marek, I think the (inc) in (decimal-fraction-digits) and the (dec) in (solution) cancel each other out, so the two functions can be simplified a bit to: (defn decimal-fraction-digits [] "Returns the lazy sequence of digits in irrational fraction created by concatenating the positive inte

Re: Euler 40

2011-02-16 Thread Marek Stępniowski
On Wed, Feb 16, 2011 at 9:15 AM, Andreas Kostler wrote: > Thanks for everyone who commented on my solution for Euler 28 yesterday. > Euler 40 is a bit easier, even more so I'm disappointed with the performance > of my solution:(defn euler-40 [n-max] > > (reduce #(* (Integer/valueOf (str %1)) (Int