CombineCommunity / CombineExt

CombineExt provides a collection of operators, publishers and utilities for Combine, that are not provided by Apple themselves, but are common in other Reactive Frameworks and standards.
https://combine.community
MIT License
1.72k stars 151 forks source link

Is there Combine equivalent to RxSwiftExt apply operator ? #160

Closed evyasafm closed 1 year ago

evyasafm commented 1 year ago

https://github.com/RxSwiftCommunity/RxSwiftExt#apply

freak4pc commented 1 year ago

To be honest, I've never used it, but it seems really simple based on the codebase, basically a mapping function:

public extension Publisher {
    func apply<Output: Publisher>(
        _ transform: (Self) -> Output
    ) -> Output {
        transform(self)
    }
}
freak4pc commented 1 year ago

Closing for now, feel free to reply if this didn't solve it for you.

evyasafm commented 1 year ago

@freak4pc great, tnx