Legend:
Library
Module
Module type
Parameter
Class
Class type
Library
Module
Module type
Parameter
Class
Class type
A profunctor which represents a function where Fn.id
may sometimes be distinguished from other functions.
This is primarily used internally to implement other things where discarding identity functions can be advantageous.
val id : ('a, 'a) t
val of_fn : ('a -> 'b) -> ('b, 'a) t
val as_fn : ('b, 'a) t -> ('a -> 'b) Base.Staged.t
Unpack the function, as_fn (of_fn x) ≡ Staged.stage x
.
split l r ≡ both (contra_map ~f:fst l) (contra_map ~f:snd r)
, but is more efficient (the result may be Id
).
Composition of function, as_fn (compose g f) ≡ Fn.compose (as_fn g) (as_fn f)
.
module Of_record :
Record_builder
with type ('b, 'a) profunctor = ('b, 'a) t
and type 'a profunctor_term = ('a, 'a) t