Then You call it a method ![]()
It’s all about function composition. If it returns nothing, it is most likely a procedure, then it’s not possible to compose with it.
As simple as it is, a function should look like this, and pure function always returns the same output for the same input. You can compose with the powerful |>
Input → Output |> Input → Output |> Input → Output
And coming from Typescript, You will see it’s important to have clear input and output types. Functions are like interfaces.
This video helped me to switch from OOP to FP, because it’s better not to compare with what You already know. In fact, You need to unlearn ![]()






















