Rowan home > Reference > Commute

Commute/Reflex Operator:

Module: Main
Syntax: dfn ⍨
Errors: R.ContextException
Keystrokes: AltGr+Shift+#

Switches the arguments of dfn. Additionally, if the new function (which is ambivalent, but based on a dyad) is used in a monadic context, the argument is duplicated.

For example:

   5÷⍨10
2
   ×⍨12
144
   ⍋⍨(5 6 2 4 1 1 3) // Sort
(1 1 2 3 4 5 6)
   ?⍨10  // Deal
(2 3 1 5 9 8 10 4 7 6 )

The ContextException is thrown if dfn is not dyadic.