from funcy import compose
def add_one(x):
return x + 1
def square(x):
return x * x
add_one_and_square = compose(square, add_one)
from funcy import curry
@curry
def add(x, y, z):
return x + y + z
add_2 = add(2)
from funcy import mapcat, keep, rflatten
data = [[1, 2, 3], [4, 5], [6, 7, 8]]
pip install funcy