Contents

updateOrAppend(_:)

Adds the given element to the set unconditionally, either appending it to the set, or replacing an existing value if one with the same id is present.

Declaration

@discardableResult mutating func updateOrAppend(_ item: MarkupOrderedSet.Element) -> MarkupOrderedSet.Element?

Parameters

  • item:

    The value to append or replace.

Return Value

The element this operation replaced, or nil if the operation appended the value to the end of the collection.

See Also

Adding elements