reactiveData

Functional reactive programming with incremental changes in data structures
IN THIS PACKAGE
Parameter #1 ReactiveData . Make . D
type 'a data

Data container

type 'a patch

Patch format for modifying the container

val merge : 'a patch -> 'a data -> 'a data

Applicative merge operation: merge p d is a new container produced by applying p on d. d does not change.

val map_patch : ( 'a -> 'b ) -> 'a patch -> 'b patch

Transform a patch

val map_data : ( 'a -> 'b ) -> 'a data -> 'b data

map f d applies f on all the elements of d, producing a new container in an applicative way

val empty : 'a data

Empty container

val equal : ( 'a -> 'a -> bool ) -> 'a data -> 'a data -> bool

Lift an equality operator over atoms of type 'a to an equality operator over 'a data

val diff : eq:( 'a -> 'a -> bool ) -> 'a data -> 'a data -> 'a patch

diff ?eq d1 d2 produces a patch describing the differences between d1 and d2.

The optional ?eq argument is used for comparing the atoms inside d1 and d2. (The default value for eq is (=).)