Sunday, February 5, 2012

1.14

The map function applies a specified function to each individual element of a specified list. It allows the programmer to apply a function to many objects with a single line of code, and in a non-looping form, meaning that in a system which supports parallel processing, multiple elements can have the function applied to them simultaneously. This provides additional abstraction capability in that writing a single line of code to apply a function to multiple objects(possibly simultaneously) is far more efficient to write(and possibly to run) than a loop which applies the function to one object at a time and requires significantly more code to write.

No comments:

Post a Comment