Skip to main content

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


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)

Uploaded Source

Built Distribution

fpiper-0.0.1-py3-none-any.whl (3.2 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page