A small library providing functional wrappers over Optional and Iterable
Project description
When coming from a functional background, it is normal to miss common chainable combinators for container types, namely:
map
|fmap
filter
|where
flatMap
|bind
|collect
This library contains simple wrappers for Optional
and Iterable
Python
values which provide just that.
The library is currently in very experimental stage, use at your own risk.
An example:
from fpiper import pipe, pipeOpt
x = pipe(myList).filter(lambda x: x > 0).flatMap(lambda x: x*2).run()
y = pipeOpt(loadCustomer).flatMap(validateCustomer).map(submitCustomer).run()
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
fpiper-0.0.1.tar.gz
(3.0 kB
view hashes)
Built Distribution
fpiper-0.0.1-py3-none-any.whl
(3.2 kB
view hashes)