Closed moodymudskipper closed 4 years ago
We cannot do this recursive piping efficiently because testing all symbols takes time, and moreover there's no builtin tool to know if %foo%
is infix, we have to deparse and regex.
That's good enough that we can use {}
and be explicit, and with ggplot we can just go to the nex tine anyway
This old thread has been automatically locked. If you think you have found something related to this, please open a new issue and link to this old issue if necessary.
We can already do this, which is an improvement over magrittr
However this won't work if we replace
%..%
by%.%
, and obviously likewise if we don't give the dots :Because we'd be piping into
+
.But
+
already had 2 arguments here, so it'd make no sense to pipe to it, thus what we can do without breaking code is to pipe to the lhs (recursively) when piping on a binary operator.::
and:::
are exceptions to that rule, they only accept symbols on the lhs and use NSE so piping to the lhs doesn't make sense, In that case we'll pipe to the rhs, which was an improvement implemented in fastpipe, and a FR by many. Not sure how to treat$
though!Piping to unary + should still work as this already work and is quite cool :