---
title: "filter(_:)"
framework: tabulardata
role: symbol
role_heading: Instance Method
path: "tabulardata/discontiguouscolumnslice/filter(_:)"
---

# filter(_:)

Generates a slice that contains the elements that satisfy the predicate.

## Declaration

```swift
func filter(_ isIncluded: (DiscontiguousColumnSlice<WrappedElement>.Element) throws -> Bool) rethrows -> DiscontiguousColumnSlice<WrappedElement>
```

## Parameters

- `isIncluded`: A predicate closure that returns a Boolean. The method uses the closure to determine whether it includes an element in the slice.
