Commit | Line | Data |
---|---|---|
7f918cf1 CE |
1 | MLtonMonoArray |
2 | ============== | |
3 | ||
4 | [source,sml] | |
5 | ---- | |
6 | signature MLTON_MONO_ARRAY = | |
7 | sig | |
8 | type t | |
9 | type elem | |
10 | val fromPoly: elem array -> t | |
11 | val toPoly: t -> elem array | |
12 | end | |
13 | ---- | |
14 | ||
15 | * `type t` | |
16 | + | |
17 | type of monomorphic array | |
18 | ||
19 | * `type elem` | |
20 | + | |
21 | type of array elements | |
22 | ||
23 | * `fromPoly a` | |
24 | + | |
25 | type cast a polymorphic array to its monomorphic counterpart; the | |
26 | argument and result arrays share the same identity | |
27 | ||
28 | * `toPoly a` | |
29 | + | |
30 | type cast a monomorphic array to its polymorphic counterpart; the | |
31 | argument and result arrays share the same identity |