functional-flow

A small library for the compose and flow functions.


License
MIT
Install
pip install functional-flow==0.0.1

Documentation

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)