Functional Programming Tools: map : Functional Programming : Function : Python examples (example source code) Organized by topic

C++
PHP
Python
Python Home »  Function   » [  Functional Programming  ]  Screenshots 
 



Functional Programming Tools: map



"map(function, sequence)" calls function(itemfor each of the sequence's 
# items and returns a list of the return values. For example, to compute some 
# cubes:

def cube(x)return x*x*x

print map(cube, range(111))
           
       
Related examples in the same category
1.  Functional Programming Tools: map: More than one sequence may be passed Functional Programming Tools: map: More than one sequence may be passed
2.  Functional Programming Tools: reduce Functional Programming Tools: reduce
3.  Functional Programming Tools: reduce 2 Functional Programming Tools: reduce 2
4.  Functional Programming Tools: filter Functional Programming Tools: filter
























Home| Contact Us
Copyright 2003 - 04 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.