---
title: "removeAll(where:)"
framework: paperkit
role: symbol
role_heading: Instance Method
path: "paperkit/markuporderedset/removeall(where:)"
---

# removeAll(where:)

Removes all the elements that satisfy the given predicate.

## Declaration

```swift
mutating func removeAll(where shouldBeRemoved: (MarkupOrderedSet.Element) throws -> Bool) rethrows
```

## Parameters

- `shouldBeRemoved`: A closure that takes an element of the set as its argument and returns a Boolean value indicating whether to remove the element from the set.

## See Also

### Removing elements

- [remove(_:)](paperkit/markuporderedset/remove(_:).md)
- [remove(at:)](paperkit/markuporderedset/remove(at:).md)
- [removeElement(for:)](paperkit/markuporderedset/removeelement(for:)-4pqof.md)
- [removeElement(for:)](paperkit/markuporderedset/removeelement(for:)-5khjd.md)
- [removeStroke(for:)](paperkit/markuporderedset/removestroke(for:).md)
