0

I keep getting a java.lang.IllegalArgumentException: Don't know how to create ISeq from: four_cloj.core$my_fib

(defn my-fib []                                                                                                                                                                 
    (let [a 0 b 1]                                                                                                                                                                 
      (lazy-seq (cons a (my-fib b (+ a b)))))) 

Anyone got any ideas?

1
  • You define my-fib as taking no arguments, but you recursively call it with 2. Commented Oct 27, 2013 at 0:59

1 Answer 1

1

Your current issue is that you are recursively calling my-fib with two arguments.

(my-fib b (+ a b))

But, the function argument list for my-fib contains no arguments

(defn my-fib []
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.