cytoolz

Cython implementation of Toolz for high-performance functional utilities

pipmacoslinuxwindows
Try with needOr install directly

About

Cython implementation of Toolz: High performance functional utilities

Commands

cytoolz

Examples

Import and use partition function to split sequences$ python -c "from cytoolz import partition; print(list(partition(2, [1,2,3,4,5])))"
Use compose to create function pipelines$ python -c "from cytoolz import compose, map; f = compose(list, map(lambda x: x*2)); print(f([1,2,3]))"
Use groupby to organize data by key function$ python -c "from cytoolz import groupby; data = [1,2,3,4,5,6]; result = groupby(lambda x: x % 2, data); print(dict(result))"