Hello all, Just started learning clojure recently - initial examples were easy to understand, until I found this example
fibonacci sequence using lazy-cat : (def fibs (lazy-cat [0 1] (map + fibs (rest fibs)))) I am trying to understand how this works ..not sure i fully comprehend it. Can anyone please explain how clojure evaluates this. 1. so if we call (take 5 fibs) for example, what does fibs initially refer to? 2. how does lazy-cat exactly work over here? Apologize if this has already been asked earlier. Thanks swaroop --~--~---------~--~----~------------~-------~--~----~ 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 new members are moderated - please be patient with your first post. 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 -~----------~----~----~----~------~----~------~--~---