iteratee "drop" requires more input than necessary

John Lato jwlato at gmail.com
Wed May 25 19:17:45 BST 2011


Thanks very much, this seems sensible.  Pushed and applied.

Also I just uploaded iteratee-0.8.4.0 to hackage which includes this and
several other additions (and better haddock too).  Most notably, 'takeUpTo'
now has sensible semantics, instead of the quasi-undefined semantics I've
used until now.

John

On Wed, May 25, 2011 at 12:09 PM, Akio Takano <tkn.akio at gmail.com> wrote:

> Hi,
>
> I expect the attached program to output:
>
> 0 1 (done) 2 3 4 5
> 0 1 (done) 2 3 4 5
>
> However I get:
>
> 0 1 (done) 2 3 4 5
> 0 1 2 (done) 3 4 5
>
> This is because the (drop n) iteratee demands the next element in the
> stream after skipping n elements. This is unnecessary, and I think
> it's more convenient if it does not, especially when processing
> real-time data using iteratee library.
>
> I included a patch to change the behavior.
>
> Regards,
> Takano Akio
>
> _______________________________________________
> Iteratee mailing list
> Iteratee at projects.haskell.org
> http://projects.haskell.org/cgi-bin/mailman/listinfo/iteratee
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://projects.haskell.org/pipermail/iteratee/attachments/20110525/40445284/attachment.htm>


More information about the Iteratee mailing list