StateTPartial

public final class StateTPartial<F, S> : Kind2<ForStateT, F, S>

Partial application of the StateT type constructor, omitting the last type argument.

  • Lifts an effect by wrapping the contained value into a function that depends on some state.

    Declaration

    Swift

    public static func liftF<A>(_ fa: Kind<F, A>) -> StateTOf<F, S, A>

    Parameters

    fa

    Value to be lifted.

    Return Value

    A StateT that produces the contained value in the original effect, preserving the state.

  • Declaration

    Swift

    public typealias D = F.D
  • Declaration

    Swift

    public static func ask() -> StateTOf<F, S, F.D>
  • Declaration

    Swift

    public static func local<A>(
        _ fa: StateTOf<F, S, A>,
        _ f: @escaping (F.D) -> F.D) -> StateTOf<F, S, A>