---
title: "init(mappingTransform:)"
framework: appintents
role: symbol
role_heading: Initializer
path: "appintents/containscomparator/init(mappingtransform:)-coon"
---

# init(mappingTransform:)

Declares support for the contains operator between an Array property and user-supplied values.

## Declaration

```swift
init(mappingTransform: @escaping (InputType) -> ComparatorMappingType) where PropertyType : _SequenceIntentValue, PropertyType : Sequence, InputType : Equatable, InputType == PropertyType.Element
```

## Parameters

- `mappingTransform`: Closure that transforms the user-supplied value into the ComparatorMappingType output type.
