Skip to content

Infix

Displays the operands of an expression with an operator between them.

$ wo 'Infix[{a, b, c}, "+"]'
a+b+c

The operands keep their own order, so Infix can print a sum with its terms arranged differently from the canonical order.

$ wo 'Infix[Reverse[List @@ (1 + x + x y)], "+"]'
x*y+x+1

Infix itself stays unevaluated.

$ wo 'Head[Infix[{a, b}, "+"]]'
Infix