MapやTryMapはoverloadが充実していて、実行時にエコな仕組みがあるので(これはRxSwiftにもある仕組み) @available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) extension Publishers.Map { public func map<T>(_ transform: @escaping (Output) -> T) -> Publishers.Map<Upstream, T> public func tryMap<T>(_ transform: @escaping (Output) throws -> T) -> Publishers.TryMap<Upstream, T> } @available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) extension Publishers.TryMap { public func map<T>(_ transform: @escaping (Output) -> T) -> Publishers.TryMap<Upstream, T> public func tryMap<T>(_ transform: @escaping (Output) throws -> T) -> Publishers.TryMap<Upstream, T> }
(edited)