← ZIO Prelude docs

ZPure

zio.prelude.fx.ZPure
See theZPure companion class
object ZPure

Attributes

Companion
class
Source
ZPure.scala
Graph
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
ZPure.type

Members list

Type members

Classlikes

final class EnvironmentWithPartiallyApplied[R](dummy: Boolean = ...) extends AnyVal

Attributes

Source
ZPure.scala
Supertypes
class AnyVal
trait Matchable
class Any
final class EnvironmentWithPurePartiallyApplied[R](dummy: Boolean = ...) extends AnyVal

Attributes

Source
ZPure.scala
Supertypes
class AnyVal
trait Matchable
class Any
final class ServiceWithPartiallyApplied[R](dummy: Boolean = ...) extends AnyVal

Attributes

Source
ZPure.scala
Supertypes
class AnyVal
trait Matchable
class Any
final class ServiceWithPurePartiallyApplied[R](dummy: Boolean = ...) extends AnyVal

Attributes

Source
ZPure.scala
Supertypes
class AnyVal
trait Matchable
class Any
final implicit class ZPureRefineToOrDieOps[W, S1, S2, R, E <: Throwable, A](self: ZPure[W, S1, S2, R, E, A])

Attributes

Source
ZPure.scala
Supertypes
class Object
trait Matchable
class Any

Inherited and Abstract types

The names of the product elements

The names of the product elements

Attributes

Inherited from:
Mirror
Source
Mirror.scala

The name of the type

The name of the type

Attributes

Inherited from:
Mirror
Source
Mirror.scala

Value members

Concrete methods

def attempt[S, A](a: => A): ZPure[Nothing, S, S, Any, Throwable, A]

Constructs a computation, catching any Throwable that is thrown.

Constructs a computation, catching any Throwable that is thrown.

Attributes

Source
ZPure.scala
def collect[W, S, R, E, A, B, Collection <: (Iterable)](in: Collection[A])(f: A => ZPure[W, S, S, R, E, Option[B]])(implicit bf: BuildFrom[Collection[A], B, Collection[B]]): ZPure[W, S, S, R, E, Collection[B]]

Evaluate each computation in the structure from left to right, collecting the successful values and discarding the empty cases.

Evaluate each computation in the structure from left to right, collecting the successful values and discarding the empty cases.

Attributes

Source
ZPure.scala
def collectAll[F[_] : ForEach, W, S, R, E, A](fa: F[ZPure[W, S, S, R, E, A]]): ZPure[W, S, S, R, E, F[A]]

Combines a collection of computations into a single computation that passes the updated state from each computation to the next and collects the results.

Combines a collection of computations into a single computation that passes the updated state from each computation to the next and collects the results.

Attributes

Source
ZPure.scala
def environment[S, R]: ZPure[Nothing, S, S, R, Nothing, ZEnvironment[R]]

Accesses the whole environment of the computation.

Accesses the whole environment of the computation.

Attributes

Source
ZPure.scala

Accesses the environment of the computation.

Accesses the environment of the computation.

Attributes

Source
ZPure.scala

Accesses the environment of the computation in the context of a computation.

Accesses the environment of the computation in the context of a computation.

Attributes

Source
ZPure.scala
def fail[E](e: E): ZPure[Nothing, Any, Nothing, Any, E, Nothing]

Attributes

Source
ZPure.scala
def forEach[F[_] : ForEach, W, S, R, E, A, B](fa: F[A])(f: A => ZPure[W, S, S, R, E, B]): ZPure[W, S, S, R, E, F[B]]

Maps each element of a collection to a computation and combines them all into a single computation that passes the updated state from each computation to the next and collects the results.

Maps each element of a collection to a computation and combines them all into a single computation that passes the updated state from each computation to the next and collects the results.

Attributes

Source
ZPure.scala
def foreach[W, S, R, E, A, B, Collection <: (Iterable)](in: Collection[A])(f: A => ZPure[W, S, S, R, E, B])(implicit bf: BuildFrom[Collection[A], B, Collection[B]]): ZPure[W, S, S, R, E, Collection[B]]

Maps each element of a collection to a computation and combines them all into a single computation that passes the updated state from each computation to the next and collects the results.

Maps each element of a collection to a computation and combines them all into a single computation that passes the updated state from each computation to the next and collects the results.

Attributes

Source
ZPure.scala
def foreachDiscard[W, S, R, E, A, B](in: Iterable[A])(f: A => ZPure[W, S, S, R, E, B]): ZPure[W, S, S, R, E, Unit]

Maps each element of a collection to a computation and combines them all into a single computation that passes the updated state from each computation to the next and discards the results.

Maps each element of a collection to a computation and combines them all into a single computation that passes the updated state from each computation to the next and discards the results.

Attributes

Source
ZPure.scala
def fromEither[S, L, R](either: Either[L, R]): ZPure[Nothing, S, S, Any, L, R]

Constructs a computation from an Either.

Constructs a computation from an Either.

Attributes

Source
ZPure.scala
def fromOption[S, A](option: Option[A]): ZPure[Nothing, S, S, Any, Unit, A]

Constructs a computation from an Option.

Constructs a computation from an Option.

Attributes

Source
ZPure.scala
def fromTry[S, A](t: Try[A]): ZPure[Nothing, S, S, Any, Throwable, A]

Constructs a computation from a scala.util.Try.

Constructs a computation from a scala.util.Try.

Attributes

Source
ZPure.scala
def get[S]: ZPure[Nothing, S, S, Any, Nothing, S]

Constructs a computation that returns the initial state unchanged.

Constructs a computation that returns the initial state unchanged.

Attributes

Source
ZPure.scala
def getWith[S, A](f: S => A): ZPure[Nothing, S, S, Any, Nothing, A]

Constructs a computation that applies the provided function to the initial state and returns the result

Constructs a computation that applies the provided function to the initial state and returns the result

Attributes

Source
ZPure.scala
def log[S, W](w: W): ZPure[W, S, S, Any, Nothing, Unit]

Attributes

Source
ZPure.scala
def modify[S1, S2, A](f: S1 => (A, S2)): ZPure[Nothing, S1, S2, Any, Nothing, A]

Constructs a computation from the specified modify function.

Constructs a computation from the specified modify function.

Attributes

Source
ZPure.scala
def modifyEither[S1, S2, E, A](f: S1 => Either[E, (A, S2)]): ZPure[Nothing, S1, S2, Any, E, A]

Constructs a computation that may fail from the specified modify function.

Constructs a computation that may fail from the specified modify function.

Attributes

Source
ZPure.scala
def none[S]: ZPure[Nothing, S, S, Any, Nothing, Option[Nothing]]

Constructs a computation that succeeds with the None value.

Constructs a computation that succeeds with the None value.

Attributes

Source
ZPure.scala
def service[S, R : Tag]: ZPure[Nothing, S, S, R, Nothing, R]

Accesses the specified service in the environment of the computation.

Accesses the specified service in the environment of the computation.

Attributes

Source
ZPure.scala

Accesses the specified service in the environment of the computation.

Accesses the specified service in the environment of the computation.

Attributes

Source
ZPure.scala

Accesses the specified service in the environment of the computation in the context of a computation.

Accesses the specified service in the environment of the computation in the context of a computation.

Attributes

Source
ZPure.scala
def set[S](s: S): ZPure[Nothing, Any, S, Any, Nothing, Unit]

Constructs a computation that sets the state to the specified value.

Constructs a computation that sets the state to the specified value.

Attributes

Source
ZPure.scala
def succeed[S, A](a: A): ZPure[Nothing, S, S, Any, Nothing, A]

Constructs a computation that always succeeds with the specified value, passing the state through unchanged.

Constructs a computation that always succeeds with the specified value, passing the state through unchanged.

Attributes

Source
ZPure.scala
def suspend[W, S1, S2, R, E, A](pure: => ZPure[W, S1, S2, R, E, A]): ZPure[W, S1, S2, R, E, A]

Returns a lazily constructed computation, whose construction may itself require effects.

Returns a lazily constructed computation, whose construction may itself require effects.

Attributes

Source
ZPure.scala
def unit[S]: ZPure[Nothing, S, S, Any, Nothing, Unit]

Constructs a computation that always returns the Unit value, passing the state through unchanged.

Constructs a computation that always returns the Unit value, passing the state through unchanged.

Attributes

Source
ZPure.scala
def unless[W, S, R, E, A](p: Boolean)(pure: => ZPure[W, S, S, R, E, A]): ZPure[W, S, S, R, E, Option[A]]

The moral equivalent of if (!p) exp

The moral equivalent of if (!p) exp

Attributes

Source
ZPure.scala
def update[S1, S2](f: S1 => S2): ZPure[Nothing, S1, S2, Any, Nothing, Unit]

Constructs a computation from the specified update function.

Constructs a computation from the specified update function.

Attributes

Source
ZPure.scala
def when[W, S, R, E, A](p: Boolean)(pure: => ZPure[W, S, S, R, E, A]): ZPure[W, S, S, R, E, Option[A]]

The moral equivalent of if (p) exp

The moral equivalent of if (p) exp

Attributes

Source
ZPure.scala
def whenCase[W, S, R, E, A, B](a: A)(pf: PartialFunction[A, ZPure[W, S, S, R, E, B]]): ZPure[W, S, S, R, E, Option[B]]

Runs a computation when the supplied PartialFunction matches for the given value, otherwise does nothing.

Runs a computation when the supplied PartialFunction matches for the given value, otherwise does nothing.

Attributes

Source
ZPure.scala

Implicits

Implicits

implicit def ZPureCovariant[W, S1, S2, R, E]: Covariant[{ type lambda = [A] =>> ZPure[W, S1, S2, R, E, A]; }#<none>]

The Covariant instance for ZPure.

The Covariant instance for ZPure.

Attributes

Source
ZPure.scala
implicit def ZPureCovariantIdentityBoth[W, S, R, E]: CovariantIdentityBoth[{ type lambda = [A] =>> ZPure[W, S, S, R, E, A]; }#<none>]

The IdentityBoth instance for ZPure.

The IdentityBoth instance for ZPure.

Attributes

Source
ZPure.scala
implicit def ZPureIdentityFlatten[W, S, R, E]: IdentityFlatten[{ type lambda = [A] =>> ZPure[W, S, S, R, E, A]; }#<none>]

The IdentityFlatten instance for ZPure.

The IdentityFlatten instance for ZPure.

Attributes

Source
ZPure.scala
final implicit def ZPureRefineToOrDieOps[W, S1, S2, R, E <: Throwable, A](self: ZPure[W, S1, S2, R, E, A]): ZPureRefineToOrDieOps[W, S1, S2, R, E, A]

Attributes

Source
ZPure.scala