Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions pages/docs/manual/latest/pipe.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -67,17 +67,17 @@ a(one, two, three);

This also works with labeled arguments.

Pipes are used to emulate object-oriented programming, e.g. what's `myStudent.getName` in other languages like Java would be `myStudent->getName` in ReScript (aka `getName(myStudent)`). This allows us to have the readability of the good parts of OOP without its downside of dragging in a huge class system just to call a function on a piece of data.
Pipes are used to emulate object-oriented programming. For example, `myStudent.getName` in other languages like Java would be `myStudent->getName` in ReScript (equivalent to `getName(myStudent)`). This allows us to have the readability of OOP without the downside of dragging in a huge class system just to call a function on a piece of data.

## Tips & Tricks

Do **not** to abuse pipes; they're a means to an end. Inexperienced engineers sometimes shape a library's API to take advantage of the pipe. This is backward.
Do **not** abuse pipes; they're a means to an end. Inexperienced engineers sometimes shape a library's API to take advantage of the pipe. This is backwards.

## JS Method Chaining

_This section requires understanding of [our binding API](bind-to-js-function.md#object-method)_.

JavaScript's APIs are often attached to objects, and often chainable, like so:
JavaScript's APIs are often attached to objects, and are often chainable, like so:

```js
const result = [1, 2, 3].map(a => a + 1).filter(a => a % 2 === 0);
Expand Down