On Feb 14, 11:13 pm, Andreas Kostler
wrote:
> Does anyone wanna have a look at my solution for Project Euler Problem 28?
>
> (defn diagonal-sum [n-max]
> (+ 1 (reduce +
> (map (fn[n]
> (reduce + (map #(- (* n n) (* %
single
list. I find this quite handy.
* It's a purely subjective thing, but I like using (inc x) and (dec x)
when incrementing and decrementing x by 1, respectively.
On Feb 14, 11:13 pm, Andreas Kostler
wrote:
> Hi all,
> Does anyone wanna have a look at my solution for Project Euler
On Tue, Feb 15, 2011 at 2:59 AM, Ken Wesson did NOT write:
> (defn diagonal-sum-4 [n-max]
> (let [cores (.availableProcessors (Runtime/getRuntime))
> step (* 2 cores)]
> (inc
> (reduce +
> (map get
> (doall
> (map #(future (diagonal-sum-4a n-max % step))
On Tue, Feb 15, 2011 at 1:13 AM, Andreas Kostler
wrote:
> Hi all,
> Does anyone wanna have a look at my solution for Project Euler Problem 28?
>
> (defn diagonal-sum [n-max]
> (+ 1 (reduce +
> (map (fn[n]
> (reduce + (map #(
Hi all,
Does anyone wanna have a look at my solution for Project Euler Problem 28?
(defn diagonal-sum [n-max]
(+ 1 (reduce +
(map (fn[n]
(reduce + (map #(- (* n n) (* % (- n 1))) (range 4
(take-nth 2 (range 3 (+ 2 n-max