Travesty.Filter_mappable_types
Signatures for filter-mapping.
The basic signatures, which contain only filter_map
, are Basic0
and Basic1
. We also define richer signatures, S0
and S1
, for which we provide functors in the main interface.
The basic signatures are Basic0
, which defines filtered mapping across an arity-0 type t
(with a fixed, associated element type elt
), and Basic1
, which defines filtered mapping across an arity-1 type 'a t
(with element type 'a
).
As with Traversable
and Mappable
, we define the basic and full signatures of filter-mappable structures in an arity-generic way, then specialise them for arity-0 and arity-1 types.
module type Generic_basic = sig ... end
Generic input shape of filter-mappable structures on either an arity-0 or arity-1 type.
module type Basic0 = sig ... end
Basic signature of an arity-0 filter-mappable type.
module type Basic1 = sig ... end
Basic signature of an arity-1 mappable type.
The full signatures are S0
(arity-0) and S1
(arity-1).
module type Generic = sig ... end
Generic output shape of filter-mappable structures on either an arity-0 or arity-1 type.
module type S0 = sig ... end
Full signature of an arity-0 filter-mappable type.
module type S1 = sig ... end
Full signature of an arity-1 mappable type.