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

# init(forMinusSet:with:)

Creates an expression object that represents the subtraction of a specified collection from a specified set.

## Declaration

```swift
init(forMinusSet 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 subtraction of right from left.

## See Also

### Creating a Collection Expression

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