package accessor

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Parameter Make_access.T

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.