-
Safe downcast.
Declaration
Swift
public static func fix(_ value: EnvTOf<E, W, A>) -> EnvT<E, W, A>Parameters
valueValue in the higher-kind form.
Return Value
Value cast to EnvT.
-
Initializes an EnvT with an environment and a value of the base Comonad.
Declaration
Swift
public init(_ e: E, _ wa: Kind<W, A>)Parameters
eEnvironment.
waValue of the base comonad.
-
Initializes an EnvT with a pair containing an environment and a value of the base Comonad.
Declaration
Swift
public init(_ pair: (E, Kind<W, A>))Parameters
pairTuple with the environment and a value of the base Comonad.
-
Obtains a tuple with the environment and a value of the base Comonad.
Declaration
Swift
public func runT() -> (E, Kind<W, A>)Return Value
A tuple with the environment and a value of the base Comonad.
-
Changes the type of the environment.
Declaration
Swift
public func local<EE>(_ f: @escaping (E) -> EE) -> EnvT<EE, W, A>Parameters
fFunction to transform the current environment.
-
Initializes an Env with an environment and a value.
Declaration
Swift
convenience init(_ e: E, _ a: A)Parameters
eEnvironment.
aValue in the base Comonad.
-
Obtains a tuple with the environment and the wrapped value.
Declaration
Swift
func run() -> (E, A)Return Value
A tuple with the environment and the wrapped value.
Install in Dash
EnvT Class Reference