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 ZIO#when methods for running effects conditionally based on state #7611

Closed
jdegoes opened this issue Dec 8, 2022 · 1 comment · Fixed by #7615
Closed

Add ZIO#when methods for running effects conditionally based on state #7611

jdegoes opened this issue Dec 8, 2022 · 1 comment · Fixed by #7615
Assignees
Labels
enhancement New feature or request

Comments

@jdegoes
Copy link
Member

jdegoes commented Dec 8, 2022

sealed trait ZIO[-R, +E, +A] {
  ...
  def whenRef[S](ref: Ref[S])(f: S => Boolean): ZIO[R, E, A] = ...
  def whenFiberRef[S](ref: FiberRef[S])(f: S => Boolean): ZIO[R, E, A] = ...
  ...
}
@adamgfraser
Copy link
Contributor

Will do!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants