LanguageExt.Core

LanguageExt.Core Monads ContT

Contents

record ContT <R, M, A> (Func<Func<A, K<M, R>>, K<M, R>> runCont) Source #

where M : Applicative<M>

The continuation monad transformer.

Can be used to add continuation handling to any type constructor: the Monad trait-implementation and most of the operations do not require M to be a monad.

Parameters

type R
type M
type A
param runCont

The continuation

Methods

method ContT<R, M, A> Pure (A value) Source #

method ContT<R, M, B> Map <B> (Func<A, B> f) Source #

Monadic bind operation

Parameters

param f

Bind function

method ContT<R, M, B> Bind <B> (Func<A, ContT<R, M, B>> f) Source #

Monadic bind operation

Parameters

param f

Bind function

method K<M, R> Run (Func<A, R> f) Source #

Run the continuation, passing the final continuation

Parameters

param f
returns