flat_map
Description:
A fused concatenate and map. The function is applied to each element of iteration and the resulting values are concatenated.
The iterator is lazy evaluated but value is force-evaluated when iterator is moved to next value.
Note:
Default implementation uses stream.
Note:
In Iterator implementation if the parent iterator is Iterator.valid and function returns a valid iterator the resulting iterator is also valid. Using the parent iterator is not allowed before the inner iterator Iterator.next return false and then it points on its last element.
Parameters:
f |
mapping function |
Returns:
Iterator over returned values |
Since:
0.11.1