text_delta v1.4.0 TextDelta.Transformation View Source
The transformation of two concurrent deltas such that they satisfy the convergence properties of Operational Transformation.
Transformation allows optimistic conflict resolution in concurrent editing. Given a delta A that occurred at the same time as delta B against the same text state, we can transform the operations of delta A such that the state of the text after applying delta A and then delta B is the same as after applying delta B and then the transformation of delta A against delta B:
S ○ Oa ○ transform(Ob, Oa) = S ○ Ob ○ transform(Oa, Ob)
There is a great article written on Operational Transformation that author of this library used. It is called Understanding and Applying Operational Transformation.
Link to this section Summary
Types
Atom representing transformation priority. Which delta came first?
Functions
Transforms right
delta against the left
one
Link to this section Types
Atom representing transformation priority. Which delta came first?
Link to this section Functions
transform(TextDelta.t(), TextDelta.t(), priority()) :: TextDelta.t()
Transforms right
delta against the left
one.
The function also takes a third TextDelta.Transformation.priority/0
argument that indicates which delta came first. This is important when
doing conflict resolution.