17 lines
320 B
Plaintext
17 lines
320 B
Plaintext
type MyType
|
|
= Variant1
|
|
| Variant2 int[usize]
|
|
| Variant3 str int[0..21]
|
|
|
|
myFunc: str, int -> MyType
|
|
myFunc strval intval =
|
|
if intval < 21 && intval > 0
|
|
then Variant3 strval intval
|
|
else Variant1
|
|
|
|
type ComplexType
|
|
= ComplexVariant (str, int -> MyType) str
|
|
|
|
myVal : ComplexType
|
|
myVal = ComplexVariant myFunc "uwu~"
|