Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@simpadjo
Copy link
Contributor

Closes #3657

Not sure how useful this combinator is with the new encoding.
It uses ZSink as a Transducer without a huge disclaimer, (consequently) it has no meaningful laws

FWIW, here is the fix

@simpadjo simpadjo requested a review from iravid as a code owner May 20, 2020 17:22
@simpadjo simpadjo changed the title fix ZSink#collectAllWhileWith fix ZSink#collectAllWhileWith (second attempt) May 20, 2020
}
}
}
self.toTransducer >>> ZSink
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could be cleaner if we had
takeWhile(p: A => Boolean): Transducer[A, Option[A]]

Copy link
Member

@iravid iravid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

@iravid iravid merged commit a8a7328 into zio:master May 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ZSink#collectAllWhileWith always returns zero value

2 participants