4,493
edits
m (Added header) |
No edit summary |
||
Line 2: | Line 2: | ||
=== Syntax === | === Syntax === | ||
By right, a [[monadic operator]] should be a | By right, a [[monadic operator]] should be a single [[glyph]], and the operand should be on the left. However, for [[backwards compatibility|historical reasons]], the outer product operator is not only a [[bi-glyph]] denoted as <source lang=apl inline>∘.</source>, the operand also appears on the right instead. | ||
Notably, this syntactical inconsistency is resolved in [[BQN]], where the outer product operator <source lang= | Notably, this syntactical inconsistency is resolved in [[J]] and [[BQN]], where the outer product operator, called Table, and denoted <source lang=j inline>/</source> and <code>⌜</code> respectively, abide by the usual operator syntax. | ||
=== Examples === | === Examples === | ||
Line 23: | Line 23: | ||
12 15 18 | 12 15 18 | ||
⍝ works for multi-dimensional | ⍝ works for multi-dimensional arrays as well | ||
y←2 3 ⍴ 'abcdef' | y←2 3 ⍴ 'abcdef' | ||
x←2 2 ⍴ ⍳4 | x←2 2 ⍴ ⍳4 |