MonadState

public protocol MonadState : Monad

Undocumented

  • S

    Undocumented

    Declaration

    Swift

    associatedtype S
  • Undocumented

    Declaration

    Swift

    static func get() -> Kind<Self, S>
  • Undocumented

    Declaration

    Swift

    static func set(_ s: S) -> Kind<Self, ()>
  • state(_:) Extension method

    Undocumented

    Declaration

    Swift

    public static func state<A>(_ f: @escaping (S) -> (S, A)) -> Kind<Self, A>
  • modify(_:) Extension method

    Undocumented

    Declaration

    Swift

    public static func modify(_ f: @escaping (S) -> S) -> Kind<Self, ()>
  • inspect(_:) Extension method

    Undocumented

    Declaration

    Swift

    public static func inspect<A>(_ f: @escaping (S) -> A) -> Kind<Self, A>