<!--
{
  "documentType" : "article",
  "framework" : "Swift",
  "identifier" : "/documentation/Swift/Dictionary/Values-swift.struct/MutableCollection-Implementations",
  "metadataVersion" : "0.1.0",
  "role" : "collectionGroup",
  "title" : "MutableCollection Implementations"
}
-->

# MutableCollection Implementations

## Topics

### Instance Methods

[`func moveSubranges(RangeSet<Self.Index>, to: Self.Index) -> Range<Self.Index>`](/documentation/Swift/Dictionary/Values-swift.struct/moveSubranges(_:to:))

Moves the elements in the given subranges to just before the element at
the specified index.

[`func partition(by: (Self.Element) throws -> Bool) rethrows -> Self.Index`](/documentation/Swift/Dictionary/Values-swift.struct/partition(by:))

Reorders the elements of the collection such that all the elements
that match the given predicate are after all the elements that don’t
match.

[`func swapAt(Self.Index, Self.Index)`](/documentation/Swift/Dictionary/Values-swift.struct/swapAt(_:_:)-18i76)

Exchanges the values at the specified indices of the collection.

[`func withContiguousMutableStorageIfAvailable<R>((inout UnsafeMutableBufferPointer<Self.Element>) throws -> R) rethrows -> R?`](/documentation/Swift/Dictionary/Values-swift.struct/withContiguousMutableStorageIfAvailable(_:))

Executes a closure on the collection’s contiguous storage.

---

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)