On Sat, Dec 27, 2008 at 2:18 PM, bOR_ <[email protected]> wrote:
> but
> didn't see an obvious/elegant way to do it in there, and the only way
> I'd write it now in clojure is going to be ugly.
>
> Anyone has a suggestion?

This kind of problem is straightforward if you understand recursion,
and the Clojure code is only a couple of elegant lines.  But I'm
reluctant to "give it away" because it is worth your time to think
through this on your own.  My suggestion is that you look at a book
like How to Design Programs (htdp.org), and work through some of the
exercises.  Once you do, you'll find problems like this to be trivial.
 Having a solid grounding in recursion will be very valuable when
working with Clojure.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To post to this group, send email to [email protected]
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