Module type Base__.Monad_intf.Basic_indexed

Indexed monad, in the style of Atkey. The second and third parameters are composed across all computation. To see this more clearly, you can look at the type of bind:


      val bind : ('a, 'i, 'j) t -> f:('a -> ('b, 'j, 'k) t) -> ('b, 'i, 'k) t
    

and isolate some of the type variables to see their individual behaviors:


      val bind : 'a             -> f:('a ->  'b           ) ->  'b
      val bind :      'i, 'j    ->               'j, 'k     ->     'i, 'k
    

For more information on Atkey-style indexed monads, see:

      Parameterised Notions of Computation
      Robert Atkey
      http://bentnib.org/paramnotions-jfp.pdf
    
type ('a, 'i, 'j) t
val bind : ('a'i'jt ‑> f:('a ‑> ('b'j'kt) ‑> ('b'i'kt
val map : [ `Define_using_bind | `Custom of ('a'i'jt ‑> f:('a ‑> 'b) ‑> ('b'i'jt ]
val return : 'a ‑> ('a'i'it