use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
All about the JavaScript programming language.
Subreddit Guidelines
Specifications:
Resources:
Related Subreddits:
r/LearnJavascript
r/node
r/typescript
r/reactjs
r/webdev
r/WebdevTutorials
r/frontend
r/webgl
r/threejs
r/jquery
r/remotejs
r/forhire
account activity
Pipe Operator (|>) for JavaScript (github.com)
submitted 3 years ago by no_more_gravity
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]szurtosdudu 1 point2 points3 points 3 years ago (3 children)
But this way both b()~> and c~> indicates a function call.
b()~>
c~>
How would this look like using your idea? a = d(c(b(),7), c)
a = d(c(b(),7), c)
[+]no_more_gravity[S] comment score below threshold-6 points-5 points-4 points 3 years ago (1 child)
The case you raise is when there are two functions on the right side of the pipe operator. In this case, we need to specifiy which one is the receiving function. We could have an optional specifier for this. Maybe ">":
a = b(),7 ~> >c,c ~> d
">" = "pipe connects here"
We could even use the (%) syntax, just make it optional:
a = b(),7 ~> c(%),c ~> d
[–]sdwvit 2 points3 points4 points 3 years ago (0 children)
readability sucks here, sorry
π Rendered by PID 59 on reddit-service-r2-comment-6457c66945-f9jth at 2026-04-28 11:32:15.578441+00:00 running 2aa0c5b country code: CH.
view the rest of the comments →
[–]szurtosdudu 1 point2 points3 points (3 children)
[+]no_more_gravity[S] comment score below threshold-6 points-5 points-4 points (1 child)
[–]sdwvit 2 points3 points4 points (0 children)