Effect

public protocol Effect : Async

Effect is a Monad that can suspend side effects into the context implementing it and supports lazy and potentially asynchronous evaluation.

  • Evaluates a side-effectful computation.

    Declaration

    Swift

    static func runAsync<A>(
        _ fa: Kind<Self, A>,
        _ callback: @escaping (Either<E, A>) -> Kind<Self, Void>) -> Kind<Self, Void>

    Parameters

    fa

    Computation to be evaluated.

    callback

    Callback to process the result of the computation.

    Return Value

    A computation describing the evaluation.