Agreed, this is in no way acceptable final result of such endeavour, but can be a fairly good starting point.
This is what I have managed to pull together:
_ = Placeholder
pipeline = partial(opr.add, 1) -C- partial(opr.sub, _, 1)
pipeline(2) # 2
2 |A| partial(opr.add, 1) -C- partial(opr.sub, _, 1) # 2
[1, 2] |AS| opr.sub -C- partial(opr.mul, 2) # -2
[11, 3] |AS| divmod -CS- opr.mul # 6
[1, 2] |AS| opr.sub -C- split([opr.pos, opr.neg]) -C- sum # 0
This is a working code.
Design and functionality improvements can now be addressed separately:
partial
improvements to specify positional order of inputspartial
at parser levelpipe
implementation- other useful utilities
- more convenient operators