RefOps

final class RefOps[F[_], A](ref: Ref[F, A]) extends AnyVal
class AnyVal
trait Matchable
class Any

Value members

Concrete methods

def modifyMaybe[B](f: A => Option[(A, B)])(F: Monad[F]): F[Option[B]]

Like modify, but can terminate early without retrying. Returns an optional value if the update completed.

Like modify, but can terminate early without retrying. Returns an optional value if the update completed.

def modifyOr[E, B](f: A => Either[E, (A, B)])(F: Monad[F]): F[Either[E, B]]

Like modify, but can terminate early with an error value without retrying. Returns a value or error based on whether the update short-circuited.

Like modify, but can terminate early with an error value without retrying. Returns a value or error based on whether the update short-circuited.

def updateMaybe(f: A => Option[A])(F: Monad[F]): F[Boolean]

Like update, but can terminate early without retrying. Returns whether or not the update short-circuited.

Like update, but can terminate early without retrying. Returns whether or not the update short-circuited.

def updateOr[E](f: A => Either[E, A])(F: Monad[F]): F[Option[E]]

Like update, but can terminate early with an error value without retrying. Returns an optional error if the update short-circuited.

Like update, but can terminate early with an error value without retrying. Returns an optional error if the update short-circuited.