package rea

  1. Overview
  2. Docs

Module Rea.PropSource

An abstraction for accessing instance variables or properties of objects.

Sourcetype 'a t

Represents an updatable instance variable or property of an object.

Sourceval make : (unit -> 'a) -> ('a -> unit) -> 'a t

make get set specifies a property from get and set.

Sourceval get : ((< .. > as 'o) -> 'a t) -> 'o -> 'a

get prop_of obj gets the property.

Sourceval set : ((< .. > as 'o) -> 'a t) -> 'a -> 'o -> 'o

set prop_of v obj functionally updates the property.

Sourceval map : ((< .. > as 'o) -> 'a t) -> ('a -> 'a) -> 'o -> 'o

map prop_of fn obj functionally updates the property.

OCaml

Innovation. Community. Security.