Thanks for these interesting replies - I have some way to go in my understanding of the power of functional programming. I look forward to seeing Stuart's chapter 5!
On Feb 16, 11:25 am, Timothy Pratley <timothyprat...@gmail.com> wrote: > Also consider (fromhttp://en.wikibooks.org/wiki/Clojure_Programming/Examples): > > (defn fib-seq [] > ((fn rfib [a b] > (lazy-cons a (rfib b (+ a b)))) > 0 1)) > > user> (take 20 (fib-seq)) > (0 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 987 1597 2584 4181) > > Regards, > Tim. --~--~---------~--~----~------------~-------~--~----~ 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 To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en -~----------~----~----~----~------~----~------~--~---