Program
public final class Program<F, A> : ProgramOf<F, A>
Program is a type that, given any type constructor, is able to provide a Monad instance, that can be interpreted into a more restrictive one.
As opposed to Free, Program does not require F to be a functor, which means that evaluation of map calls are deferred
and left for the later interpretation in another monad.
-
Internal representation of
ProgramDeclaration
Swift
public let asFree: Free<CoyonedaPartial<F>, A> -
Initializes a
Programinstance from the correspondingFree<CoyonedaPartial<F>>.Declaration
Swift
public init(asFree: Free<CoyonedaPartial<F>, A>) -
Safe downcast.
Declaration
Swift
public static func fix(_ fa: ProgramOf<F, A>) -> Program<F, A>Parameters
faValue in the higher-kind form.
Return Value
Value cast to
Program. -
Lifts a value in the context of
Finto theProgramcontext.Declaration
Swift
public static func liftF(_ fa: Kind<F, A>) -> Program<F, A>Parameters
faA value in the context of
F.Return Value
A
Programvalue.
Install in Dash
Program Class Reference