FUNCTIONAL PROGRAMMING

#example: return list of even numbers from 0 to 25
>>> filter(lambda x: x % 2 == 0, range(25))
[0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24]

#example: return a list of squares:
>>> map(lambda x: x*x, range(15))
[0, 1, 4, 9, 16, 25, 36, 49, 64, 81, 100, 121, 144, 169, 196]

example: count total sum for a list of numbers
>>> lst = [10, 20, 30, 40, 50]
>>> reduce(lambda a, b: a+b, lst)
150