Hi Meikel, On May 10, 3:05 am, Meikel Brandmeyer <m...@kotka.de> wrote: > There is a mistake in this function: pred should be (pred) > as well as f should be (f).
> Furthermore I would call it repeatedly-while. > > (defn repeatedly-while > [pref f] > (lazy-seq > (when (pred) > (cons (f) (cons-while pred f))))) > > Then this should work: > > (repeatedly-while #(.ready reader) #(.readLine reader)) Yes, that works now. Thanks. So the extra parentheses are there to force the evaluation of the predicate and function? Regards, Mark -- http://mark.reid.name --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---