2 ms·
Ocaml has had the @@ operator for a while, which is |> with it's arguements inversed, so you could write "print_int(2+3)" or "print_int @@ 2+3". Haskell is in a
by gizmo686 9y ago
Ocaml has had the @@ operator for a while, which is |> with it's arguements inversed, so you could write "print_int(2+3)" or "print_int @@ 2+3". Haskell is in a similar place, with the $ operator (equivalent to @@), but no |> in the standard library [0]. The main issue is that for a lot of people, there just isn't that much of a benefit to composing function left to right, as apposed to right to left; especially since the "simple" way of just using parentheses gives us right to left composition.
[0] If you want this, check out the flow package https://hackage.haskell.org/package/flow-1.0.8/docs/Flow.html https://hackage.haskell.org/package/flow-1.0.8/docs/Flow.htm...