What's the difference between -> and |> in reasonml?
问题 A period of intense googling provided me with some examples where people use both types of operators in one code, but generally they look just like two ways of doing one thing, they even have the same name 回答1: tl;dr: The defining difference is that -> pipes to the first argument while |> pipes to the last. That is: x -> f(y, z) <=> f(x, y, z) x |> f(y, z) <=> f(y, z, x) Unfortunately there are some subtleties and implications that makes this a bit more complicated and confusing in practice.