-
Notifications
You must be signed in to change notification settings - Fork 605
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 evalScan1 operator #2850
base: main
Are you sure you want to change the base?
Add evalScan1 operator #2850
Conversation
Sorry this has been sitting for so long 😕 I am going to close/re-open the PR to kick-start CI against the latest |
@armanbilge No problem, thanks for looking into it :) |
There is some failing test but I don't think that it is connected:
|
Yeah I think that's the known flake ... |
def go(z: O2, s: fs2.Stream[F2, O]): Pull[F2, O2, Unit] = | ||
s.pull.uncons1.flatMap { | ||
case Some((hd, tl)) => | ||
Pull.eval(f(z, hd)).flatMap(o => Pull.output1(o) >> go(o, tl)) | ||
case None => Pull.done | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this repeated from evalScan
? Can we extract it into a private helper evalScan_
like is used for scan
/scan1
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds like a good idea, let me try it.
Hi,
I needed such operator today and as it wasn't trivial to write it, so I decided to commit it back to the fs2 repository.