by mesrik · 1mo ago · 0 comments
So is this better too
$ less | find / -type f -perm /6000 -ls
than ? $ find / -type f -perm /6000 -ls | less
Just because shell actually starts executables right to left when using pipes.
Reason to this behaviour is because it can fail early if there is problem constructing pipe first and not spend lot of time something finding later that some pipe components can't start and receive data properly.ps. I'm fine with current notation and would not like change it.
f3(f2(f1(some data)))
it would be nice to write some data |> f1 |> f2 |> f3
javascript has proposals for pipe operators because as soon as the simple .map /.filter/.reduce APIs don't suffice (ie. as soon as Promise.all is needed) the f3(f2(f1(data))) mess starts.R.pipe(f1,f2,f3)()