I saw the following:
type rlevel = [
| `rlevel
]
but I've never seen this before and the tutorials for ADTs (algebraic data types) are not super helpful nor is the OCaml grammar.
What does this mean?
I saw the following:
type rlevel = [
| `rlevel
]
but I've never seen this before and the tutorials for ADTs (algebraic data types) are not super helpful nor is the OCaml grammar.
What does this mean?
The type rlevel
is a type abbreviation for a polymorphic variant type (https://ocaml.org/manual/polyvariant.html) which contains only one constructor `rlevel
.
[ `rlevel ]
–
Purcell © 2022 - 2024 — McMap. All rights reserved.
'rlevel
? What would be an example value? – Classroom