If you haven't seen the impl yet, it's relatively small and simple: https://github.com/clojure/clojure/blob/master/src/clj/clojure/core.clj#L642 https://github.com/clojure/clojure/blob/master/src/jvm/clojure/lang/LazySeq.java
Chunked seqs are more complex, but they're basically a performance optimization. On Mon, Mar 10, 2014 at 6:43 PM, Frank Behrens <fbehr...@gmail.com> wrote: > Hello, > > I'm trying to understand the lazyness, how they work, how to create them, > how to avoid pre-realisation. > > Can someone point me to which documentation would be helpful, where do I > find it ? > > Frank > > Am Montag, 10. März 2014 13:16:00 UTC+1 schrieb Asfand Yar Qazi: > >> On Monday, 10 March 2014 11:35:30 UTC, Alan Forrester wrote: >>> >>> According to the documentation for map >>> http://clojuredocs.org/clojure_core/clojure.core/map >>> (map + x y) >>> >>> where x and y are two collections adds the first element of x to the >>> first element of y, the second element of x to the second element of y >>> and so on until either x or y is exhausted. >>> >> >> OK I feel like an idiot - I was going by what I picked up from Clojure >> Programming, and didn't read the official API docs, sorry. The "until >> either x or y is exhausted" bit is what was the missing piece of the puzzle. >> >> >>> You seem to be trying to imagine how lazy-seqs work rather than >>> reading the documentation, which tells you how they behave when you >>> run a program or type an expression into the REPL. >>> >> >> I will take your advice on-board. >> >> Many thanks >> >> > -- > 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 > --- > You received this message because you are subscribed to the Google Groups > "Clojure" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to clojure+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- 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 --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.