ReScript @rescript-lang.org · Nov 26

Pipes are one of the most powerful concepts in ReScript. Pipes let you build function chains easily, with great support for type inference, and great editor support like autocomplete. It's just a syntax transform, so it compiles to regular, efficient JS function calls.

18 likes 1 replies

?

Replies

ReScript · Nov 26

A pipe takes the result of the left hand expression and pipes it into the expression after the pipe as the first argument, "carrying" the result of your function calls throughout the pipe chain. No need for functions to be on the prototype like in JS for chaining to work.