ยค ContM, putMk, et al

Monadic style

Types

newtype ContM k r = Mk {unMk :: Cont k r}
instance Functor (ContM k)
instance Applicative (ContM k)
instance Monad (ContM k)

putMk :: StreamProcIO sp => o -> ContM (sp i o) ()
getMk :: StreamProcIO sp => ContM (sp i o) i

type Cont c a = (a -> c) -> c

Description

ContM is a generic continuation monad. It can be used e.g. to program stream processors or fudget kernels in monadic style.

See Also

Continuation monad with state: Ms.

Continuation monad specialized to stream processors: SPm.