collect
Subscribes to this MaybeSource and performs the specified action for each received element.
If action throws an exception at some point or if the MaybeSource raises an error, the exception is rethrown from collect.
Subscribes to this ObservableSource and performs the specified action for each received element.
If action throws an exception at some point, the subscription is cancelled, and the exception is rethrown from collect. Also, if the ObservableSource signals an error, that error is rethrown from collect.