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."
        [e n p]
        (if (< n 1000000)
                (if (= (rem n 2) 0)
                        (findFib (+ e n) (+ n p) (n))
                        (findFib (e) (+ n p) (n)))
        (str "Value is " e)))

And I keep getting this error

1:9 problem2=> (findFib 0 1 2)
1:10 problem2=> java.lang.ClassCastException: java.lang.Integer cannot
be cast to clojure.lang.IFn (repl-1:9)

I know my code may be incorrect to find the issue at hand but I cannot
get passed this issue.

Can anyone help?

Thanks!!
peregrine.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to