<SYSTEM_TASK:>
Given the following text description, write Python code to implement the functionality described below step by step
<END_TASK>
<USER_TASK:>
Description:
 Functional Programming in Python
Interest in Functional Programming is currently growing as more developers become aware of the benefits it offers, particularly with respect to concurrency and scale.
For some background on Functional Programming see the paper 'Why Functional Programming Matters
Step1:  Filter
fiter takes in a sequence and returns a sequence containing only those elements of the sequence for which a function when applied to the element returns true.
filter(function, sequence)
For example
Step2:  Reduce
reduce performs computations on a sequence and returns a single result.
reduce(function, sequence)
For example
<ASSISTANT_TASK:>
Python Code:
sequence = [1, 2, 3, 4, 5]
def square(x):
    return x**2
   
result = list(map(square, sequence))
print(result)
Explanation: Functional Programming in Python
Interest in Functional Programming is currently growing as more developers become aware of the benefits it offers, particularly with respect to concurrency and scale.
For some background on Functional Programming see the paper 'Why Functional Programming Matters: http://www.cse.chalmers.se/~rjmh/Papers/whyfp.pdf
There are several aspects of Python that support a functional programming style.
For example: map, reduce and filter.
Map
map applies a function to all the items in an input sequence.
python
map(function, sequence)
For example:
```python
sequence = [1, 2, 3, 4, 5]
def square(x):
    return x**2
result = list(map(square, sequence))
print(result)
```
Run the code below to see the output.
End of explanation
sequence = range(-10, 10)
greater_than_zero = list(filter(lambda x: x > 0, sequence))
print(greater_than_zero)
Explanation: Filter
fiter takes in a sequence and returns a sequence containing only those elements of the sequence for which a function when applied to the element returns true.
filter(function, sequence)
For example:
python
sequence = range(-10, 10)
greater_than_zero = list(filter(lambda x: x &gt; 0, sequence))
print(greater_than_zero)
End of explanation
from functools import reduce
product = reduce((lambda x, y: x * y), [1, 2, 3, 4])
print(product)
Explanation: Reduce
reduce performs computations on a sequence and returns a single result.
reduce(function, sequence)
For example:
python
from functools import reduce
product = reduce((lambda x, y: x * y), [1, 2, 3, 4])
print(product)
At each step the function passed to reduce is passed two arguments, the current reduced value and the next value from the sequence. By default, the first item in the sequence is used as the initial value of the reduction value.
End of explanation
<END_TASK>