import * as fun from "https://deno.land/x/fun@v.2.0.0-alpha.11/monad.ts";
Functions
Derive a Monad instance from of, chain, and a Kind. This is the simplest way to get a Monad instance when one has a creation function (of) and a chain function (aka flatMap or bind). |
Interfaces
A Monad is an algebra with a notion of join(aka flatten or flat) for a given algebraic data type T. A Monad must also extend Functor, Apply, Applicative, and Chain. This means a Monad has the following methods: of, ap, map, join, and chain. An intuition for Monad can be found by thinking about how Promise.then handles functions that return a new Promise. |