Erlang Pipeline parse_transform

What is it for

Sometimes erlang programmer wants to apply function composition. Usually it is done by ugly combining functions, e.g.

Result = fun3(mod2:fun2(fun1(Arg1, Arg2))).

Other way to do that is creating multiple bindings:

R1 = fun1(Arg1, Arg2),
R2 = mod2:fun2(R1),
Result = fun3(R2).

This parse_transform allows to write like this:

Result = [fun1, mod2:fun2, fun3] (Arg1, Arg2).

More complicated options are available – see src/pipeline_demo.erl for examples.

Building and using pipeline

Building is made by rebar:

rebar3 compile

To use pipeline, simply compile target module with {parse_transform, pipeline} option.

CHANGES

0.2.0