On Jun 14, 9:39 am, James Reeves <weavejes...@googlemail.com> wrote:
> Okay, but don't underestimate the power of higher level functions. I
> don't know whether it would apply to your code, but the repeatedly
> function can be used to create a lazy seq from a function with side-
> effects.
>
> For example:
>
>   (defn custom-lazy-seq [stream]
>     (repeatedly #(next-item-in-seq stream)))

I wrote super-lazy-seq because repeatedly can't generate a finite
sequence. It just spat out

(File1 File2 File3 File4 nil nil nil nil nil nil nil ...

:)
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to