Content deleted Content added
Rephrase |
Add title to visual example |
||
Line 21:
which yields <code>[1, 4, 9, 16, 25]</code>, demonstrating that <code>map</code> has gone through the entire list and applied the function <code>square</code> to each element.
=== Visual example ===
Below, you can see a view of each step of the mapping process for a list of integers <code>X = [0, 5, 8, 3, 2, 1]</code> that we want to map into a new list <code>X'</code> according to the function <math>f(x) = x + 1</math> :
|