difference(from:)
Returns the difference needed to produce this collection’s ordered elements from the given collection.
Declaration
func difference<C>(from other: C) -> CollectionDifference<Self.Element> where C : BidirectionalCollection, Self.Element == C.ElementParameters
- other:
The base state.
Return Value
The difference needed to produce this collection’s ordered elements from the given collection.
Discussion
This function does not infer element moves. If you need to infer moves, call the inferringMoves() method on the resulting difference.