<!--
{
  "availability" : [
    "iOS: 27.0.0 -",
    "iPadOS: 27.0.0 -",
    "macOS: 27.0.0 -",
    "visionOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "PaperKit",
  "identifier" : "/documentation/PaperKit/MarkupOrderedSet/append(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "PaperKit"
    ],
    "preciseIdentifier" : "s:8PaperKit16MarkupOrderedSetV6appendySb8inserted_Si5indextAA0C0_pF"
  },
  "title" : "append(_:)"
}
-->

# append(_:)

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

```
@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.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)