module Applicative: Generic_util_applicative
Applicative Functors and instances for option, list, identity, constant.
module T: sig
.. end
include T
type 'f
t = 'f applicative
Operations
val fun_of_app : 'a applicative -> 'a Functor.functorial
val liftA : 'a applicative ->
('b -> 'c) ->
('b, 'a) App.T.app -> ('c, 'a) App.T.app
val liftA2 : 'a applicative ->
('b -> 'c -> 'd) ->
('b, 'a) App.T.app ->
('c, 'a) App.T.app -> ('d, 'a) App.T.app
val liftA3 : 'a applicative ->
('b -> 'c -> 'd -> 'e) ->
('b, 'a) App.T.app ->
('c, 'a) App.T.app ->
('d, 'a) App.T.app -> ('e, 'a) App.T.app
val liftA4 : 'a applicative ->
('b -> 'c -> 'd -> 'e -> 'f) ->
('b, 'a) App.T.app ->
('c, 'a) App.T.app ->
('d, 'a) App.T.app ->
('e, 'a) App.T.app -> ('f, 'a) App.T.app
Traversing lists of effectful elements
val traverse : 'a applicative ->
('b -> ('c, 'a) App.T.app) ->
'b list -> ('c list, 'a) App.T.app
val sequence : 'a applicative ->
('b, 'a) App.T.app list -> ('b list, 'a) App.T.app
Instances
val id : App.id applicative
val const : 'a Monoid.T.monoid -> 'a App.const applicative
val option : App.option' applicative
val list : App.list' applicative