Skip to main content

A small library for the compose and flow functions.

Project description

Functional Flow

This is a small library providing the compose and flow functions as inspired by James Sinclair's blog post.

Installation


pip install functional-flow

Usage


from functional_flow import compose, flow

f = lambda x: x + 1
g = lambda x: x * 3

dynamic_compose = compose(
    f,
    g
)
compose_result = dynamic_compose(3)

dynamic_flow = flow(
    f,
    g
)
flow_result = dynamic_flow(3)

print(compose_result)
print(flow_result)

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

functional_flow-0.0.1.tar.gz (2.7 kB view hashes)

Uploaded Source

Built Distribution

functional_flow-0.0.1-py3-none-any.whl (2.5 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