Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/0xleif/flatmany

flatMap --> Publishers.MergeMany --> map --> collect
https://github.com/0xleif/flatmany

combine publishers rx swift

Last synced: 16 days ago
JSON representation

flatMap --> Publishers.MergeMany --> map --> collect

Awesome Lists containing this project

README

        

# FlatMany

*flatMap --> Publishers.MergeMany --> map --> collect*

## What does FlatMany do?
When you have a `Publisher` which has an Output that is a sequence. FlatMany makes it easy to map each element of that sequence into a publisher.

## Usage
```swift
import FlatMany
```

### Example
```swift
let task = Just<[Int]>([1, 2, 3])
.flatMany {
Just("\($0 * $0)").eraseToAnyPublisher()
}
.sink { values in
print(values)
}
```