---
title: "init(forIntersectSet:with:)"
framework: foundation
role: symbol
role_heading: Initializer
path: "foundation/nsexpression/init(forintersectset:with:)"
---

# init(forIntersectSet:with:)

Creates an expression object that represents the intersection of a specified set and collection.

## Declaration

```swift
init(forIntersectSet left: NSExpression, with right: NSExpression)
```

## Parameters

- `left`: An expression that evaluates to an NSSet object.
- `right`: An expression that evaluates to a collection object (an instance of NSArray, NSSet, or NSDictionary).

## Return Value

Return Value A new NSExpression object that represents the intersection of left and right.

## See Also

### Creating a Collection Expression

- [init(forAggregate:)](foundation/nsexpression/init(foraggregate:).md)
- [init(forUnionSet:with:)](foundation/nsexpression/init(forunionset:with:).md)
- [init(forMinusSet:with:)](foundation/nsexpression/init(forminusset:with:).md)
