Operators that transform items that are emitted by an Observable.


Map

transform the items emitted by an Observable by applying a function to each item

각 항목에 함수를 적용하여 Observable이 내 보낸 항목을 변환합니다.

The Map operator applies a function of your choosing to each item emitted by the source Observable, and returns an Observable that emits the results of these function applications.

지도 연산자는 소스 Observable에서 내 보낸 각 항목에 선택한 함수를 적용하고 이러한 함수 애플리케이션의 결과를 내보내는 Observable을 반환합니다.

map 구현체

extension ObservableType {

    /**
         Projects each element of an observable sequence into a new form.
    
         - seealso: [map operator on reactivex.io](<http://reactivex.io/documentation/operators/map.html>)
    
         - parameter transform: A transform function to apply to each source element.
         - returns: An observable sequence whose elements are the result of invoking the transform function on each element of source.
    
         */
    public func map<Result>(_ transform: @escaping (Self.Element) throws -> Result) -> RxSwift.Observable<Result>
}