<!--
{
  "availability" : [
    "iOS: 13.0.0 -",
    "iPadOS: 13.0.0 -",
    "macCatalyst: 13.0.0 -",
    "macOS: 10.15.0 -",
    "tvOS: 13.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 6.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Combine",
  "identifier" : "/documentation/Combine/Publishers/Map",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "Combine"
    ],
    "preciseIdentifier" : "s:7Combine10PublishersO3MapV"
  },
  "title" : "Publishers.Map"
}
-->

# Publishers.Map

A publisher that transforms all elements from the upstream publisher with a provided closure.

```
struct Map<Upstream, Output> where Upstream : Publisher
```

## Topics

### Creating a map publisher

[`init(upstream:transform:)`](/documentation/Combine/Publishers/Map/init(upstream:transform:))

Creates a publisher that transforms all elements from the upstream publisher with a provided closure.

### Mapping elements

[`map(_:)`](/documentation/Combine/Publishers/Map/map(_:))

[`tryMap(_:)`](/documentation/Combine/Publishers/Map/tryMap(_:))

### Declaring supporting types

[`Output`](/documentation/Combine/Publishers/Output)

A publisher that publishes elements specified by a range in the sequence of published elements.

[`Failure`](/documentation/Combine/Publishers/Map/Failure)

The kind of errors this publisher might publish.

### Inspecting publisher properties

[`upstream`](/documentation/Combine/Publishers/Map/upstream)

The publisher from which this publisher receives elements.

[`transform`](/documentation/Combine/Publishers/Map/transform)

The closure that transforms elements from the upstream publisher.

## Relationships

### Conforms To

[`Publisher`](/documentation/Combine/Publisher)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)