o not have to declare a function and its args explicitly.
>
> this particular example you cannot write using #() syntax though because
> it is recursing at 2 points and you cannot use 'recur'.
>
> Jim
>
> wOn 13/11/13 17:41, Angus wrote:
> > I know this fib
I know this fibonacci function is not optimal but I want to learn one step
at a time. I want to be able to apply this approach to 4clojure which
disallows a lot of things including defn.
This is my implementation so far:
(defn fib [x]
(cond
(= x 0) 0
(= x 1) 1
:else
(count % '(1 2 3))
I am getting error: clojure.lang.ArityException: Wrong number of args (2)
passed to: core$count
--
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from