renkun-ken / pipeR

Multi-Paradigm Pipeline Implementation
Other
169 stars 39 forks source link

Pipe() #69

Open ggrothendieck opened 8 years ago

ggrothendieck commented 8 years ago

It would be nice if this:

Pipe(mtcars) $ dim()

could be written like this (syntax could vary but hopefully this gives the idea of avoiding having to put the input within parentheses):

Pipe() $ mtcars $ dim()
renkun-ken commented 8 years ago

In Pipe(x)$f, $ always returns a closure assuming f is a function that can be get() from the evaluation environment to its parents. Pipe()$mtcars will inconsistently return a data object, which may produce more ambiguity. I'm not sure if it's possible or whether it's a good idea.

ggrothendieck commented 8 years ago

As mentioned it would not have to be Pipe() $ x $ .... It could start with startPipe() $ x $ ..., say. IMHO this would be easier to read than Pipe(x) $ ...