U
viQ @ s d dl mZmZmZmZ d dlmZmZmZ d dlm Z
d dlm Z d dlmZ d dl
mZ d dlmZmZ edZed Zdeeeef eee gee f ddd
Zdeeeef eee gee f dddZd
dgZd
S ) )CallableOptionalTypeVarcast)
Observableabccompose) operators)typing)identity)infinite)Mapper
MapperIndexed_T1_T2N)mapperreturnc s6 | pt tttf t tt tt d fdd}|S )N)sourcer c s0 dt jt tt j t jd fdd
}t|S )a Partially applied map operator.
Project each element of an observable sequence into a new form
by incorporating the element's index.
Example:
>>> map(source)
Args:
source: The observable source to transform.
Returns:
Returns an observable sequence whose elements are the
result of invoking the transform function on each element
of the source.
N)obv schedulerr c s, t d d fdd}j| j j|dS )N)valuer c
sH z | }W n, t k
r8 } z| W 5 d }~X Y nX | d S N) Exceptionon_erroron_next)r resulterr)_mapperr I/opt/alt/python38/lib/python3.8/site-packages/reactivex/operators/_map.pyr ( s
z5map_.