moodymudskipper / nakedpipe

Pipe Into a Sequence of Calls Without Repeating the Pipe Symbol.
69 stars 7 forks source link

support bquote's `.()` and `..()` everywhere in the nakedpipe #27

Open moodymudskipper opened 3 years ago

moodymudskipper commented 3 years ago

.() would be a bit like !! but work with base functions too.

substitution could be made upfront, or step by step so it can use temp variables (but I don't imagine use cases now where it would be useful). Upfront is faster, and doesn't need to be dealt with in debugging pipe. Translations into magrittr won't look too good.

We might find some intersting uses for ..() :

my_expr <- expression(cyl == 4, head(2) ~ mpg)
mtcars %.% {
  ..(my_expr)
}