Transforming with map & filter
Reshape values as they flow downstream.
Operators Reshape Streams
Between a publisher and its subscriber you can insert operators that transform values as they flow downstream.
map Transforms Each Value
The map operator runs a closure on every value and emits the result, changing the stream's shape.
[1, 2, 3].publisher
.map { $0 * 10 }All lessons in this course
- Publishers & Subscribers
- Transforming with map & filter
- Debounce for Live Search
- Bridging Combine into SwiftUI