MonadDefer
public protocol MonadDefer : MonadError
MonadDefer is a Monad that provides the ability to delay the evaluation of a computation.
-
Provides a computation that evaluates the provided function on every run.
Parameters
faFunction returning a computation to be deferred.
Return Value
A computation that defers the execution of the provided function.
-
later(_:)Extension methodProvides a computation that evaluates the provided function on every run.
Declaration
Swift
static func later<A>(_ f: @escaping () throws -> A) -> Kind<Self, A>Parameters
fFunction returning a value.
Return Value
A computation that defers the execution of the provided function.
-
later(_:)Extension method -
lazy()Extension methodProvides a lazy computation that returns void.
Declaration
Swift
static func lazy() -> Kind<Self, Void>Return Value
A deferred computation of the void value.
-
laterOrRaise(_:)Extension methodProvides a computation that evaluates the provided function on every run.
Parameters
fA function that provides a value or an error.
Return Value
A computation that defers the execution of the provided value.
Install in Dash
MonadDefer Protocol Reference