shell
pip install funcy
python
import funcy
python
result = funcy.map(lambda x: x * 2, [1, 2, 3, 4, 5])
python
result = funcy.filter(lambda x: x % 2 == 0, [1, 2, 3, 4, 5])
python
result = funcy.reduce(lambda x, y: x + y, [1, 2, 3, 4, 5])
python
func = funcy.compose(lambda x: x + 1, lambda x: x * 2)
result = func(4)
python
from funcy import decorators
@decorators.once
def greet():
print("Hello!")
python
with funcy.ignore(ValueError):
print("End of program")