package crdt-ml
CRDTs - Conflict-Free Replicated Data Types for OCaml
Install
Dune Dependency
Authors
Maintainers
Sources
v0.10.0.tar.gz
sha256=c9be2ec006cd4f65e6a9bddbcedf024f876134afc1ddf4fb689dd0167de25b73
md5=b8337dcb24a3220a3c35bd5bae5c8f12
doc/crdt_mutable/M_ORSet/index.html
Module M_ORSet
Observed-Remove set.
Supports add
, remove
, lookup
and merge
operations. See Mutable_types.RSet
. Contains two separate instances of a regular Map
, one for adding (add_s
) and the other for removing (remove_s
).
add el t
adds (unique (), el)
to add_s
, where unique is the result of calling Random.bits. This may or may not be enough entropy for your use case.
remove el t
adds all {(u, el) | ∃ u : (u, el) ∈ add_s}
to remove_s
Both lookup
and value
operate on the set difference add_s \ remove_s
.
merge a b
calls merges add_s_a
with add_s_b
and the same for b
module Make
(O : Mutable_types.Comparable) :
Mutable_types.RSet with type elt = O.t
Creates an add / remove set of elements satisfying Mutable_types.Comparable
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>