iteratee "drop" requires more input than necessary

Akio Takano tkn.akio at gmail.com
Wed May 25 12:09:33 BST 2011


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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: drop.hs
Type: text/x-haskell
Size: 456 bytes
Desc: not available
URL: <http://projects.haskell.org/pipermail/iteratee/attachments/20110525/d3f2cb64/attachment.hs>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: drop.dpatch
Type: application/octet-stream
Size: 3439 bytes
Desc: not available
URL: <http://projects.haskell.org/pipermail/iteratee/attachments/20110525/d3f2cb64/attachment.obj>


More information about the Iteratee mailing list