Monad describing computations in continuation-passing style. The monadic
values are functions that are called with a single argument representing
the continuation of the computation, to which they pass their result.
(defmonad cont-m "Monad describing computations in continuation-passing style. The monadic values are functions that are called with a single argument representing the continuation of the computation, to which they pass their result." [m-result (fn m-result-cont [v] (fn [c] (c v))) m-bind (fn m-bind-cont [mv f] (fn [c] (mv (fn [v] ((f v) c))))) ])
Comments top
No comments for cont-m. Log in to add a comment.