Skip to content

Commit 36ff34f

Browse files
authored
Merge pull request #113 from Dyalog/110-better-support-for-generics
Add documentation for 43⌶ and generics. Closes #110
2 parents 09aac7f + dd8670d commit 36ff34f

File tree

4 files changed

+36
-0
lines changed

4 files changed

+36
-0
lines changed

language-reference-guide/docs/the-i-beam-operator/i-beam.md

+1
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ The column labelled *O/S* indicates if a function applies only on Windows (W), o
2929
|A |Derived Function |O/S |
3030
|-------|--------------------------------------------------------------------------------------|------|
3131
|`8` |[Inverted Table Index-of](./inverted-table-index-of.md) | |
32+
|`43` |[Monadic Operator Generator](./monadic-operator-generator.md) | |
3233
|`85` |[Execute Expression](./execute-expression.md) | |
3334
|`127` |[Overwrite Free Pockets](./overwrite-free-pockets.md) | |
3435
|`180` |[Canonical Representation](./canonical-representation.md) | |
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
<h1 class="heading"><span class="name">Monadic Operator Generator</span> <span class="command">R←43⌶Y</span></h1>
2+
3+
Returns a monadic operator, with functionality determined by the value of `Y`.
4+
5+
`Y` is a scalar integer. Possible values for `Y` are shown in the table below. If an undefined value is specified, a `DOMAIN ERROR` is generated.
6+
7+
`R` is a monadic operator with functionality determined by the value of `Y`.
8+
As `R`is a monadic operator, Dyalog Ltd recommends that the evaluation of this I-Beam is either parenthesised or named.
9+
10+
| `Y` | Returned Operator | Notes |
11+
|---|--- |---|
12+
|632|[Generics Operator](#632-generics-operator)| Requires .NET. |
13+
14+
15+
!!! warning
16+
The set of supported values for `Y` might change, with existing values being withdrawn as well as new ones being added. This means that saving the resulting operator in a workspace and attempting to run it in a later release might result in a `DOMAIN ERROR` if support has been withdrawn.
17+
18+
19+
### 632 - Generics Operator
20+
The generics operator can create concrete versions of generic classes and execute generic methods. For more information, see the *.NET Interface Guide*.
21+
22+
<h3 class="example">Example</h3>
23+
24+
```apl
25+
⎕USING←''
26+
27+
⍝ I-Beam call is parenthesised
28+
IntList←System.Collections.Generic.List (43⌶632) System.Int32
29+
30+
⍝ Result of I-Beam call is named
31+
GenOp←43⌶632
32+
CharList←System.Collections.Generic.List GenOp System.Char
33+
```

language-reference-guide/mkdocs.yml

+1
Original file line numberDiff line numberDiff line change
@@ -309,6 +309,7 @@ nav:
309309
- The I-Beam Operator:
310310
- Introduction: the-i-beam-operator/i-beam.md
311311
- Inverted Table Index Of: the-i-beam-operator/inverted-table-index-of.md
312+
- Monadic Opeator Generator: the-i-beam-operator/monadic-operator-generator.md
312313
- Execute Expression: the-i-beam-operator/execute-expression.md
313314
- Overwrite Free Pockets: the-i-beam-operator/overwrite-free-pockets.md
314315
- Canonical Representation: the-i-beam-operator/canonical-representation.md

language-reference-guide/print_mkdocs.yml

+1
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,7 @@ nav:
201201
- I-Beam: primitive-operators/i-beam.md
202202
- The I-Beam Operator:
203203
- Inverted Table Index Of: the-i-beam-operator/inverted-table-index-of.md
204+
- Monadic Opeator Generator: the-i-beam-operator/monadic-operator-generator.md
204205
- Execute Expression: the-i-beam-operator/execute-expression.md
205206
- Overwrite Free Pockets: the-i-beam-operator/overwrite-free-pockets.md
206207
- Canonical Representation: the-i-beam-operator/canonical-representation.md

0 commit comments

Comments
 (0)