---
title: "append(_:)"
framework: paperkit
role: symbol
role_heading: Instance Method
path: "paperkit/markuporderedset/append(_:)"
---

# append(_:)

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

## Declaration

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

## Parameters

- `item`: The element to add to the set.

## Return Value

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

- [append(contentsOf:)](paperkit/markuporderedset/append(contentsof:).md)
- [insert(_:at:)](paperkit/markuporderedset/insert(_:at:).md)
- [updateOrAppend(_:)](paperkit/markuporderedset/updateorappend(_:).md)
