Contents

append(_:)

Appends a new member to the end of the set, if the set doesn’t already contain it.

Declaration

@discardableResult mutating func append(_ item: MarkupOrderedSet.Element) -> (inserted: Bool, index: Int)

Parameters

  • item:

    The element to add to the set.

Return Value

A pair (inserted, index), where inserted is a Boolean value indicating whether the operation added a new element, and index is the index of item in the resulting set.

See Also

Adding elements