Closed ThierryBleau closed 3 years ago
Piping is technically already supported as the pipe operator is an infix operator (which we can already parse). The only thing missing would be the implementation (See #54)
Should we use PAny for argument placement?
Not sure, but I think we should exclude this feature from the first implementation of the pipe operator.
Should we use PAny for argument placement?
Actually, I think this is separate from the pipe operator, as f(_, x)
is, by itself, a valid expression. E.g.: A
, B
and C
are basically equivalent
let f = (x, y) => x / y;
// A
let f' = f(_, 2);
f'(1);
// B
f(_, 2)1;
// C
1 |> f(_, 2);
Add Grammar:
Implement piping: expr_value pipe fun_expr ->
EApp(fun_expr, expr_value)
Design: Should we use
PAny
for argument placement?