Thanks everyone! This seems so obvious now that I look at it.
On Oct 19, 10:55 am, Siddhartha Reddy wrote:
> The arguments 'n' and 'e' to the calls to findFib on lines 7 and 8 are
> enclosed in parens, causing them to be treated as lists. Clojure expects the
> first element in a list to be a fun
2009/10/19 Peregrine :
>
> Hey I am new to Clojure and I am doing some Project Euler problems to
> help me get started with the language. I've run into a issue I cannot
> seem to get past. I have this code:
>
> (defn findFib
> "Find the sum of all the even-valued terms in the sequence which
The arguments 'n' and 'e' to the calls to findFib on lines 7 and 8 are
enclosed in parens, causing them to be treated as lists. Clojure expects the
first element in a list to be a function and is therefore trying to cast it
to an IFn which of course fails.
I think this is what you are looking for:
On Oct 19, 5:52 pm, Peregrine wrote:
> Hey I am new to Clojure and I am doing some Project Euler problems to
> help me get started with the language. I've run into a issue I cannot
> seem to get past. I have this code:
>
> (defn findFib
> "Find the sum of all the even-valued terms in the
Hey I am new to Clojure and I am doing some Project Euler problems to
help me get started with the language. I've run into a issue I cannot
seem to get past. I have this code:
(defn findFib
"Find the sum of all the even-valued terms in the sequence which do
not exceed four million."