# Function map

- map<T, U>(iterable, f): Iterable<U>

- The equivalent of Array.prototype.map for iterators.

  #### Type Parameters

  - T
  - U

  #### Parameters

  - iterable: Iterable<T, any, any>

    The iterator to map over.

  - f: ((x: T, index: number) => U)

    The mapping function.

    - - (x, index): U

      - #### Parameters

        - x: T
        - index: number

        #### Returns U

  #### Returns Iterable<U>