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

Skip to content

Conversation

@adamgfraser
Copy link
Contributor

Resolves #4010. I didn't implement takeUntil in terms of takeUntilM purely for efficiency.

@adamgfraser adamgfraser requested a review from iravid July 27, 2020 18:10
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.

💪

@iravid iravid merged commit 4ce2ce6 into zio:master Jul 28, 2020
i += 1
}
}
taking as builder.result()
Copy link
Contributor

Choose a reason for hiding this comment

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

Why not have a simpler implementation —

mapM(A => pred(A).map(cond => (A, cond)).takeUntil(_._2).map(_._1)

@adamgfraser adamgfraser deleted the takeUntilM branch August 2, 2020 20:37
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.

Feature Request: takeUntilM in ZStream

3 participants