<!--
{
  "availability" : [
    "iOS: 27.0.0 -",
    "iPadOS: 27.0.0 -",
    "macCatalyst: 27.0.0 -",
    "macOS: 27.0.0 -",
    "tvOS: 27.0.0 -",
    "visionOS: 27.0.0 -",
    "watchOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Swift",
  "identifier" : "/documentation/Swift/UniqueArray/append(moving:)-9p4vs",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Swift"
    ],
    "preciseIdentifier" : "s:s11UniqueArrayVsRi_zrlE6append6movingys10OutputSpanVyxGz_tF"
  },
  "title" : "append(moving:)"
}
-->

# append(moving:)

Moves the elements of a output span to the end of this array, leaving the
span empty.

```
mutating func append(moving items: inout OutputSpan<Element>)
```

## Parameters

`items`

An output span whose contents need to be appended to this array.

## Discussion

If the array does not have sufficient capacity to hold all new items,
then this reallocates the array’s storage to grow its capacity,
using a geometric growth rate.

> Complexity: O(`items.count`)

---

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)