pip install funcy
python
from funcy import *
def add_one(x):
return x + 1
def multiply_by_two(x):
return x * 2
composed_function = add_one . multiply_by_two
result = composed_function(3)
python
from funcy import *
numbers = [1, 2, 3, 4, 5, 6]
mapped_numbers = mapcat(lambda x: [x**2, x**3], numbers)
filtered_numbers = lkeep(even, numbers)