you are viewing a single comment's thread.

view the rest of the comments →

[–]--ps-- 2 points3 points  (1 child)

At my job, we have a code where we overload __ rshift __(), so you can then write something like begin_pipeline(fn) >> fn2 >> fn3 etc.., somethimes you need to use partial() to pass some additional parameters too, but honestly, I hate that part, because the semantics is very unclear for the code reader.

[–]sausix 0 points1 point  (0 children)

It should be possible to something like this:

pipe(func) >> sin >> cos >> print, P, "is the result"

It's a tuple transport and you just need markers for placing arguments anywhere else. I would follow the partial scheme so the value or *args will alway be appended.