Replaces a postfix expression with a prefix expression and vice versa.