Re: Lazy seq from input

2011-02-08 Thread David Andrews
See also Jeff Palmucci's clj-yield. -- 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

Re: Lazy seq from input

2011-02-07 Thread Ken Wesson
On Mon, Feb 7, 2011 at 10:18 PM, Benny Tsai wrote: > The blip.tv video of Tom Faulhaber's "Lisp, Functional Programming, > and the State of Flow" talk from Clojure Conj showed me 'fill-queue', > which seems like a good fit here. > > 'fill-queue' is a way to turn input from any source into a lazy >

Re: Lazy seq from input

2011-02-07 Thread Benny Tsai
The blip.tv video of Tom Faulhaber's "Lisp, Functional Programming, and the State of Flow" talk from Clojure Conj showed me 'fill-queue', which seems like a good fit here. 'fill-queue' is a way to turn input from any source into a lazy sequence. You give it a one-arg function, 'filler-func', whic

Re: Lazy seq from input

2011-02-07 Thread Ken Wesson
On Mon, Feb 7, 2011 at 9:16 PM, Andreas Kostler wrote: > Thank's Ken, that's doing what I want. However, being the noob I am, I don't > quite understand what's going on. > Do you mind elaborating a little bit on the functions? Your help is greatly > appreciated :) You're welcome. Take-until is

Re: Lazy seq from input

2011-02-07 Thread Andreas Kostler
Thank's Ken, that's doing what I want. However, being the noob I am, I don't quite understand what's going on. Do you mind elaborating a little bit on the functions? Your help is greatly appreciated :) Cheers Andreas On 08/02/2011, at 12:00 PM, Ken Wesson wrote: > On Mon, Feb 7, 2011 at 8:09 PM

Re: Lazy seq from input

2011-02-07 Thread Ken Wesson
On Mon, Feb 7, 2011 at 8:09 PM, Andreas Kostler wrote: > Hi all, > Is it possible to read from a lazy input sequence? I have a telnet > connection using commons.telnet and I want to do something like: > (def telnet (TelnetClient.)) > (def in (. telnet getInputStream)) > > ; How do I do this? > (de

Lazy seq from input

2011-02-07 Thread Andreas Kostler
Hi all, Is it possible to read from a lazy input sequence? I have a telnet connection using commons.telnet and I want to do something like: (def telnet (TelnetClient.)) (def in (. telnet getInputStream)) ; How do I do this? (def read-until ; read from a lazy input sequence UNTIL prompt is matched