Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!
-
The built-in function
mapapplies a function to each element of an iterable.mapis not useful mostly of time as Python has list comprehension, etc.mapsupport iterating multiple iterables at the same time.map(f, sequence1, sequence2)which is equivalent to
[f(x1, x2) for x1, x2 in zip(sequence1, sequence2)] -
There are some useful functions in the modules
functoolsandoperator. Below is the functional programming way of summing all elements in an array.functools.reduce(operator.add, L)
References
http://briansimulator.org/
https://pypi.python.org/pypi/brian/