For your mental model parameter matching works like this:
:a = variable_a = parameter_value
# with explicit parenthesis (right associativity)
:a = (variable_a = parameter_value)
So the parameter value is first matched with variable_a. The match operator always returns the right hand side value, so afterwards :a = :a is evaluated, which doesn’t raise and again return the right hand side.
Given those behaviours order in the function head essentially doesn’t matter much, though having more constraining match values more to the right could be a micro optimization.






















