---
title: "map(_:)"
framework: xpc
role: symbol
role_heading: Instance Method
path: "xpc/xpcarray/map(_:)"
---

# map(_:)

Returns an array containing the results of mapping the given closure over the sequence’s elements.

## Declaration

```swift
func map<ReturnType>(_ transform: (XPCArray.IndexValuePair) throws -> ReturnType) rethrows -> [ReturnType]
```

## Parameters

- `transform`: A mapping closure. transform accepts an element of this sequence as its parameter and returns a transformed value of the same or of a different type.
