Legend:
Library
Module
Module type
Parameter
Class
Class type
Library
Module
Module type
Parameter
Class
Class type
Module that implements the "Applicative" interface.
type ('input, 'a) t = ('input, 'a) sink
val pure : 'a -> ('b, 'a) t
f <*> sink
is a function application for functions contained in a sink.
This operator can be combined with (<@>)
to run multiple sinks at the same time:
let mean = Sink.((/) <@> sum <*> len)
Which is equivalent to the following version without operators:
let mean = Sink.(map (fun (total, count) -> total / count) (both sum len))