3 ms·
I agree that this example isn't convincing, I also prefer the "vanilla" Math.sqrt(64). It's more convincing (IMO) when chaining calls, eg: Math.sqrt(Math.ceil
by williamdclt 8y ago
I agree that this example isn't convincing, I also prefer the "vanilla" Math.sqrt(64).
It's more convincing (IMO) when chaining calls, eg:
Math.sqrt(Math.ceil(Math.sin(64)))
VS.
64 |> Math.sin |> Math.ceil |> Math.sqrt
- mercer 8y agoI used to feel that way until I got comfortable with Elixir and its pipe operator. I think without prior knowledge the latter, which is interpreted left-to-right, is more intuitive: "take some data, do x, do y, do z"