6 Oct
2015
6 Oct
'15
12:52 a.m.
Hi, I would like to know what other think about the order of the pipe (See this issue https://github.com/pfultz2/Fit/issues/5). What would be the expected meaning of auto r1 =1 | pipable(f)(2); f(1,2) or f(2,1)? What would be the expected meaning of auto f2 = partial(f)(2); auto r1 =1 | pipable(f2); f(1,2) or f(2,1)? As the operator| has left-to-right associativity, we can not do auto x = 1 | 2 | pipable(f); We would need a way to pack the parameters auto x = forward_as_tuple(1, 2) | pipable(f); but this wouldn't compile as f has two parameters. or use parenthesis auto x = 1 | (2 | pipable(f)); and the result will be f(2, 1). Any ideas? Best, Vicente Vicente