package travesty

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

Converts a monad to a mappable over M.map.

At time of writing, M satisfies the mappable interface in its own right; this functor mainly exists as insurance in case the two interfaces ever diverge.

Parameters

module M : Base.Monad.S

Signature

include Mappable_types.Generic with type 'a t := 'a M.t and type 'a elt := 'a

Generic refers to the container type as 'a t, and the element type as 'a elt; substitute t/elt (arity-0) or 'a t/'a (arity-1) accordingly below.

include Generic_types.Generic with type 'a t := 'a M.t with type 'a elt := 'a
val map : 'a M.t -> f:('a -> 'b) -> 'b M.t

map c ~f maps f over every t in c.