Re: realizing a lazy line-seq inside with-open

2013-05-28 Thread Sean Corfield
On Mon, May 27, 2013 at 9:50 PM, Kevin Downey redc...@gmail.com wrote: doall doesn't recurse, so you are not realizing the lazy-seq, you want something like [msg (doall sig-strs)] Thank you Kevin! When Elango said my suggestion didn't work, I was puzzled. Now it makes sense! -- Sean A Corfield

Re: realizing a lazy line-seq inside with-open

2013-05-28 Thread Elango Cheran
And yep, Kevin's change works. Looking into reducers + I/O sounds interesting, I'll definitely check it out, thanks! On Mon, May 27, 2013 at 11:21 PM, Sean Corfield seancorfi...@gmail.comwrote: On Mon, May 27, 2013 at 9:50 PM, Kevin Downey redc...@gmail.com wrote: doall doesn't recurse, so

realizing a lazy line-seq inside with-open

2013-05-27 Thread Elango Cheran
Hi everyone, I had a function that reads the contents of a file (in this case, it represents a license) and then verifies the contents. As I started to expand the code for verifying, it made sense to break the function up into a function for file parsing and a function for verification. The

Re: realizing a lazy line-seq inside with-open

2013-05-27 Thread Elango Cheran
Much simpler, although I'm still seeing the following exception, unless I keep the form (str [msg sig-strs]): IOException Stream closed java.io.BufferedReader.ensureOpen (BufferedReader.java:115) Any ideas why? On Mon, May 27, 2013 at 5:44 PM, Sean Corfield seancorfi...@gmail.comwrote: Just

Re: realizing a lazy line-seq inside with-open

2013-05-27 Thread Kevin Downey
doall doesn't recurse, so you are not realizing the lazy-seq, you want something like [msg (doall sig-strs)] if you are looking to play around with io stuff, I recommend looking in to using reducers for io, they allow you to sort of invert control, keeping the nice property of with-open always