Extended pipes for functional programming
Project description
morepipes
Based on the pipe library, adding more utilities and pipes to it
Some pipes are inspired by other programming languages (eg Rust)
Installation
pip install morepipes
Examples
Consume iterable
range(9) | where(lambda x: x % 2) | collect(list)
# List of odd numbers
Side effects
range(9) | ... | inspect | ...
# Prints out each object received on evaluation
Or, more generally
range(9) | ... | foreach(print) | ...
New: Partial Pipes
Creating a partial pipe
reverse_sort = P | reverse | sort
# P is a special object placeholder
Using a partial pipe
[1, 3, 4, 2] | reverse_sort
# Just like any other pipe
Have fun!
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
morepipes-1.0.1.tar.gz
(3.6 kB
view hashes)
Built Distribution
Close
Hashes for morepipes-1.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c9228545bc8c29208283572226ad7bcc14c52b3eedd8113fcd4e78cb6a378c29 |
|
MD5 | 91c29da7f7b251460af55e47fb8239e3 |
|
BLAKE2b-256 | 1781500ae5610c7c4385e3efa80a70623a45fbdff915a020566654b6b1c938f1 |