We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
unconsNonEmpty
Pull
It's often useful to write pull with uncons, and skip over empty chunks by pulling the next chunk. This combinator makes sense to be in the library
uncons
example impl from @mpilquist: https://gitter.im/functional-streams-for-scala/fs2?at=5d162e628dff05627b84bebe
def unconsNonEmpty: Pull[F, INothing, Option[(Chunk[O], Stream[F, O])]] = self.uncons.flatMap { case Some((hd, tl)) => if (hd.isEmpty) tl.pull.unconsNonEmpty else Pull.pure(Some((hd, tl))) case None => Pull.pure(None) }
The text was updated successfully, but these errors were encountered:
I was wondering in which use cases you will be pulling empty chunks 🤔
Sorry, something went wrong.
Add unconsNonEmpty (typelevel#1527)
ad08526
Merge pull request #1650 from valydia/unconsnonempty
cfd6213
Add unconsNonEmpty (#1527)
No branches or pull requests
It's often useful to write pull with
uncons
, and skip over empty chunks by pulling the next chunk. This combinator makes sense to be in the libraryexample impl from @mpilquist: https://gitter.im/functional-streams-for-scala/fs2?at=5d162e628dff05627b84bebe
The text was updated successfully, but these errors were encountered: