Combines two patches to produce a new patch that describes the updates of the first patch and then the updates of the second patch.
Combines two patches to produce a new patch that describes the updates of
the first patch and then the updates of the second patch. The combine
operation should be associative. In addition, if the combine operation is
commutative then joining multiple fibers concurrently will result in
deterministic FiberRef
values.
Constructs a patch describing the updates to a value from an old value and a new value.
An empty patch that describes no changes.
Applies a patch to an old value to produce a new value that is equal to the old value with the updates described by the patch.
A symbolic alias for zip
.
A symbolic alias for orElseEither
.
Combines this differ and the specified differ to produce a differ that knows how to diff the sum of their values.
Transforms the type of values that this differ knows how to differ using the specified functions that map the new and old value types to each other.
Combines this differ and the specified differ to produce a new differ that knows how to diff the product of their values.
A
Differ[Value, Patch]
knows how to compare an old value and new value of typeValue
to produce a patch of typePatch
that describes the differences between those values. ADiffer
also knows how to apply a patch to an old value to produce a new value that represents the old value updated with the changes described by the patch.A
Differ
can be used to construct aFiberRef
supporting compositional updates using theFiberRef.makePatch
constructor.The
Differ
companion object contains constructors forDiffer
values for common data types such asChunk
,Map
, andSet
. In addition,
Differvalues can be transformed using the
transformoperator and combined using the
orElseEitherand
zipoperators. This allows creating
Differvalues for arbitrarily complex data types compositionally.