Skip to content
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

add stateless effectful unfold #691

Closed
wants to merge 1 commit into from
Closed

add stateless effectful unfold #691

wants to merge 1 commit into from

Conversation

tpolecat
Copy link
Member

This adds a method to unfold an effectful computation F[Option[A]] into Stream[F,A].

resolves #690

@fiadliel
Copy link
Contributor

I'd usually write that kind of behaviour in this way (unNoneTerminate is the standard pipe combinator for terminating Option[_] streams):

Stream.repeatEval(f).through(pipe.unNoneTerminate)

But then I wouldn't write it that way in StreamDerived, which probably shouldn't depend on functions from pipe.

I'm not strongly against this extra method, but just asking if the addition pulls its weight, given available combinators...?

@tpolecat
Copy link
Member Author

Ok, I didn't know about that pipe combinator. That works for me.

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.

2 participants