Quantcast
Channel: ReScript Forum - Latest posts
Viewing all articles
Browse latest Browse all 2592

Why does the "pipe" operator have a higher precedence?

$
0
0

I think the precedence is similar to JS:

3 + toString(4)
// or
3 + (4).toString()

Mind that pipes are syntactic sugar for function calls (example one) and are used to model method calls (example two).

Also, parens are a powerful tool to change precedence to your liking. Just sayin’ :innocent:


Viewing all articles
Browse latest Browse all 2592

Trending Articles