New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Weird leftovers when zipping iteratees #1068

Open
travisbrown opened this Issue Dec 2, 2015 · 0 comments

Comments

Projects
None yet
1 participant
@travisbrown
Contributor

travisbrown commented Dec 2, 2015

For example:

import scalaz._, Scalaz._, iteratee._

type It[A] = IterateeT[String, Option, A]

val abc = EnumeratorT.enumList[String, Option](List("a", "b", "c", "d", "e"))
val head = Iteratee.head[String, Option]
val rest = Iteratee.consume[String, Option, List]

val it1 = ().point[It].zip(().point[It])
val it2 = head.zip(head.flatMap(_ => head))

And then:

scala> (it1.flatMap(_ => rest) &= abc).run
res1: Option[List[String]] = Some(List(b, c, d, e))

scala> (it2.flatMap(_ => rest) &= abc).run
res2: Option[List[String]] = Some(List(d, e))

Where clearly the first should include a and the second should include c.

travisbrown added a commit to travisbrown/iteratee that referenced this issue Dec 3, 2015

travisbrown added a commit to travisbrown/iteratee that referenced this issue Dec 3, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment