Creates a new collection difference from a collection of changes.
SDK
- Xcode 11.0+
Framework
- Swift Standard Library
Declaration
Parameters
changes
A collection of changes that represent a transition between two states.
Discussion
To find the difference between two collections, use the difference(from:)
method declared on the Bidirectional
protocol.
The collection of changes passed as changes
must meet these requirements:
Complexity: O(n * log(n)), where n is the length of the parameter.
All insertion offsets are unique
All removal offsets are unique
All associations between insertions and removals are symmetric