Legend:
Library
Module
Module type
Parameter
Class
Class type
Library
Module
Module type
Parameter
Class
Class type
val select : ('a, 'b) Base.Either.t t -> ('a -> 'b) t -> 'b t
val (<*?) : ('a, 'b) Base.Either.t t -> ('a -> 'b) t -> 'b t
An operator alias for select
, which is sometimes convenient. It tries to follow the notational convention for Applicative
operators. The angle bracket pointing to the left means we always use the corresponding value. The value on the right, however, may be unnecessary, hence the question mark.
val branch : ('a, 'b) Base.Either.t t -> ('a -> 'c) t -> ('b -> 'c) t -> 'c t
The branch
function is a natural generalisation of select
: instead of skipping an unnecessary effect, it chooses which of the two given effectful functions to apply to a given argument; the other effect is unnecessary.
Branch on a Boolean value, skipping unnecessary effects.