3 ms·
But then CPS machinery is often used to implement Monads. > Programming with monads strongly reminiscent of continuation—passing style (CPS), and this paper ex
by dumbo-octopus 2y ago
But then CPS machinery is often used to implement Monads.
> Programming with monads strongly reminiscent of continuation—passing style (CPS), and this paper explores the relationship between the two. In a sense they are equivalent: CPS arises as a special case of a monad, and any monad may be embedded in CPS by changing the answer type.
https://cs.uwaterloo.ca/~david/cs442/monads.pdf https://cs.uwaterloo.ca/~david/cs442/monads.pdf