package accessor

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

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

field (fun a -> a, Fn.id) = Fn.id
Fn.compose (field f) (field g)
= field (fun a ->
  let a, j = f a in
  let a, k = g a in
  a, Fn.compose j k)
OCaml

Innovation. Community. Security.