View Source OT.Text.Composition (OT v0.2.0)
The composition of two non-concurrent operations into a single operation.
Link to this section Summary
Functions
Compose two operations into a single equivalent operation.
Link to this section Functions
Compose two operations into a single equivalent operation.
The operations are composed in such a way that the resulting operation has the same effect on document state as applying one operation and then the other: S ○ compose(Oa, Ob) = S ○ Oa ○ Ob.
example
Example
iex> OT.Text.Composition.compose(["Bar"], [3])
{:ok, ["Bar"]}
@spec compose_many([Operation.t()]) :: {:ok, Operation.t()} | {:error, binary()}