text_delta v1.4.0 TextDelta.Iterator View Source

Iterator iterates over two sets of operations at the same time, ensuring next elements in the resulting stream are of equal length.

Link to this section Summary

Types

A tuple representing the new head and tail operations of the two operation sets being iterated over

Individual set of operations

A set’s next scanned full or partial operation, and its resulting tail set

Two sets of operations to iterate

A type which is not to be sliced when iterating. Can be :insert, :delete or nil

Functions

Generates next cycle by iterating over given sets of operations

Link to this section Types

A tuple representing the new head and tail operations of the two operation sets being iterated over.

Individual set of operations.

Link to this type set_split() View Source
set_split() :: {TextDelta.Operation.t() | nil, set()}

A set’s next scanned full or partial operation, and its resulting tail set.

Two sets of operations to iterate.

Link to this type skip_type() View Source
skip_type() :: :insert | :delete | nil

A type which is not to be sliced when iterating. Can be :insert, :delete or nil

Link to this section Functions

Link to this function next(sets, skip_type \\ nil) View Source
next(sets(), skip_type()) :: cycle()

Generates next cycle by iterating over given sets of operations.