Map (higher-order function): Difference between revisions

Content deleted Content added
Loillibe (talk | contribs)
text not wrapped around the image
Loillibe (talk | contribs)
Change image format of mapping process
Line 26:
map f (x : xs) = f x : map f xs
</syntaxhighlight>Now, suppose we have a list of integers [0, 5, 8, 3, 2, 1] and we want to map it with the function f(x) = x + 1, you can see below a view of each steps of the mapping process :
[[File:Mapping-steps-loillibe-new.gif|alt=applying map function processing steps|none|thumb|440x440px480x480px|View of processing steps when applying map function on a list|none]]
 
==Generalization==