When you’re using the parentheses (2 ~> 3), aren’t you overriding the operator precedence? Expressions — Erlang System Documentation v29.0.2
Without the parentheses, the pipe operator macro will expand and take the 2 expressions before/after it resulting in 1 ~> 2.
defmodule Hello do
def unquote(:~>)(a, b, c) do
a + b + c
end
end
import Hello
Macro.expand((quote do: (1 |> 2 ~> 3)), __ENV__)
{:~>, [], [{:|>, [context: Elixir, import: Kernel], [1, 2]}, 3]}


















