Binding Strength
For two entities X and Y that are adjacent in an expression (that is, X Y), the binding strength between them and the result of the bind is shown in this table:
| Y | ||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| A | F | H | MOP | DOP | DOT | IDX | ||||||||||||||||
| X | A |
|
|
|
|
|
|
|
||||||||||||||
| F |
|
|
|
|
|
|
|
|||||||||||||||
| H |
|
|
|
|
|
|
|
|||||||||||||||
| AF |
|
|
|
|
|
|
|
|||||||||||||||
| MOP |
|
|
|
|
|
|
|
|||||||||||||||
| DOP |
|
|
|
|
|
|
|
|||||||||||||||
| JOT |
|
|
|
|
|
|
|
|||||||||||||||
| DOT |
|
|
|
|
|
|
|
|||||||||||||||
| REF |
|
|
|
|
|
|
|
|||||||||||||||
| IDX |
|
|
|
|
|
|
|
|||||||||||||||
| A | : *Array, for example, 0 1 2 'hello' ⍺ ⍵ |
| F | : *Function (primitive/defined/derived/system), for example, + - +.× myfn ⎕CR {⍺ ⍵} |
| H | : *Hybrid function/operator, that is, / ⌿ \ ⍀ |
| AF | : Bound left argument, for example, 2+ |
| MOP | : *Monadic operator, for example, ¨ ⍨ & |
| DOP | : Dyadic operator, for example, ⍣ ⍠ ⍤ ⌸ |
| JOT | : Jot, that is, compose/null operand ∘ |
| DOT | : Dot, that is, reference/product . |
| IDX | : square-bracketed expression, for example, [⍺+⍳⍵] |
| ERR | : Error |
* indicates a "first-class" entity, which can be parenthesised or named
In this table:
- the higher the number, the stronger the binding
- an empty field indicates no binding for this combination; an error.
For example, in the expression a b.c[d], where a, b, c and d are arrays, the binding proceeds:
a b . c [d]
6 7 6 4 ⍝ binding strengths between entities
→ a (b.) c [d]
0 7 4
→ a (b.c) [d]
6 4
→ (a(b.c))[d]