package accessor

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
type ('a, 'b) t
val isomorphism : get:('at -> 'a) -> construct:('b -> 'bt) -> ('a, 'b) t -> ('at, 'bt) t

A legal implementation of this function must satisfy the following properties:

isomorphism ~get:Fn.id ~construct:Fn.id = Fn.id
Fn.compose
  (isomorphism ~get:g1 ~construct:c1)
  (isomorphism ~get:g2 ~construct:c2)
= isomorphism ~get:(Fn.compose g2 g1) ~construct:(Fn.compose c1 c2)
OCaml

Innovation. Community. Security.