Skip to content
Prev 59228 / 63424 Next

[External] Re: New pipe operator

On 06/12/2020 9:43 a.m., D?nes T?th wrote:
You are missing the point.  The value of the RHS is irrelevant to the 
transformation.  All that matters is its form.  So "foo" and 
"function(x) x" are completely different things, even if identical() 
thinks their value is the same.

It's also true that "foo()" and "function(x) x" are completely 
different, but they are well-defined forms:  one is a call, the other is 
an anonymous function definition.

Accepting a plain "foo" would add a third form (a name), which might 
make sense, but hardly gains anything: whereas dropping the anonymous 
function definition costs quite a bit.  Without special-casing anonymous 
function definitions you'd need to enter

mtcars |> (function(x) x)()

or

mtcars |> (\(x) x)()

which are both quite difficult to read.

Duncan Murdoch

Thread (78 messages)

Duncan Murdoch New pipe operator Dec 4 Hiroaki Yutani New pipe operator Dec 4 Duncan Murdoch New pipe operator Dec 4 Dénes Tóth New pipe operator Dec 4 Sebastian Meyer New pipe operator Dec 4 Deepayan Sarkar New pipe operator Dec 4 iuke-tier@ey m@iii@g oii uiow@@edu New pipe operator Dec 4 Duncan Murdoch New pipe operator Dec 4 Duncan Murdoch New pipe operator Dec 4 iuke-tier@ey m@iii@g oii uiow@@edu New pipe operator Dec 4 Avi Gross New pipe operator Dec 4 Ivan Krylov New pipe operator Dec 4 Duncan Murdoch New pipe operator Dec 5 Hugh Parsonage New pipe operator Dec 5 Gabor Grothendieck New pipe operator Dec 5 iuke-tier@ey m@iii@g oii uiow@@edu New pipe operator Dec 5 John Mount New pipe operator Dec 5 Abby Spurdle New pipe operator Dec 5 Gregory R. Warnes New pipe operator Dec 5 Hiroaki Yutani New pipe operator Dec 5 Rui Barradas New pipe operator Dec 5 Jan Gorecki New pipe operator Dec 6 Dénes Tóth New pipe operator Dec 6 Avi Gross New pipe operator Dec 6 Duncan Murdoch New pipe operator Dec 6 Dénes Tóth New pipe operator Dec 6 Duncan Murdoch New pipe operator Dec 6 Gabor Grothendieck New pipe operator Dec 6 iuke-tier@ey m@iii@g oii uiow@@edu New pipe operator Dec 6 Gabor Grothendieck New pipe operator Dec 6 Avi Gross New pipe operator Dec 6 iuke-tier@ey m@iii@g oii uiow@@edu New pipe operator Dec 6 Gabriel Becker New pipe operator Dec 6 Dénes Tóth New pipe operator Dec 6 Gabor Grothendieck New pipe operator Dec 6 Gabriel Becker New pipe operator Dec 6 Gabor Grothendieck New pipe operator Dec 6 Bravington, Mark (Data61, Hobart) New pipe operator Dec 6 Gabriel Becker New pipe operator Dec 6 Gabor Grothendieck New pipe operator Dec 6 Duncan Murdoch New pipe operator Dec 7 Duncan Murdoch New pipe operator Dec 7 Gabor Grothendieck New pipe operator Dec 7 Gabor Grothendieck New pipe operator Dec 7 iuke-tier@ey m@iii@g oii uiow@@edu New pipe operator Dec 7 Deepayan Sarkar New pipe operator Dec 7 Gabor Grothendieck New pipe operator Dec 7 Deepayan Sarkar New pipe operator Dec 7 Peter Dalgaard New pipe operator Dec 7 Gabor Grothendieck New pipe operator Dec 7 Duncan Murdoch New pipe operator Dec 7 Gregory R. Warnes New pipe operator Dec 7 Peter Dalgaard New pipe operator Dec 7 Duncan Murdoch New pipe operator Dec 7 Duncan Murdoch New pipe operator Dec 7 iuke-tier@ey m@iii@g oii uiow@@edu New pipe operator Dec 7 Gabor Grothendieck New pipe operator Dec 7 Kevin Ushey New pipe operator Dec 7 Gabor Grothendieck New pipe operator Dec 7 Gabriel Becker New pipe operator Dec 7 Gabriel Becker New pipe operator Dec 7 Dénes Tóth New pipe operator Dec 7 Gabriel Becker New pipe operator Dec 7 Gabor Grothendieck New pipe operator Dec 8 Hadley Wickham New pipe operator Dec 8 Gabor Grothendieck New pipe operator Dec 8 Bravington, Mark (Data61, Hobart) New pipe operator Dec 8 Duncan Murdoch New pipe operator Dec 8 Bravington, Mark (Data61, Hobart) New pipe operator Dec 8 Jan van der Laan New pipe operator Dec 9 Duncan Murdoch New pipe operator Dec 9 Duncan Murdoch New pipe operator Dec 9 Jan van der Laan New pipe operator Dec 9 Duncan Murdoch New pipe operator Dec 9 Gabor Grothendieck New pipe operator Dec 9 Gabriel Becker New pipe operator Dec 9 Gabor Grothendieck New pipe operator Dec 9 Peter Dalgaard New pipe operator Dec 9