thanks for the answer, well, I rewrote the function lik this:
(defn recursive-reverse [coll]
(loop [col coll mem '()]
(if (empty? col)
mem
(recur (rest col) (cons (first col) mem)) )))
I've a little logic problem but I fix it....
thanks
On Nov 23, 12:54 am, Sean Corfield <[email protected]> wrote:
> On Tue, Nov 22, 2011 at 8:49 PM, coco <[email protected]> wrote:
> > ((cons (last col) mem)
> > (recur (butlast col) mem) ))))
> ...
> > ((cons (last col) mem)
> > (recur col mem) ))))
>
> In both of these, you have a function call with (cons (last col) mem)
> as the function...
>
> You're going to need (recur something something-else) as the else
> expression for recur to be in the tail position.
>
> HTH,
> --
> Sean A Corfield -- (904) 302-SEAN
> An Architect's View --http://corfield.org/
> World Singles, LLC. --http://worldsingles.com/
>
> "Perfection is the enemy of the good."
> -- Gustave Flaubert, French realist novelist (1821-1880)
--
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