Amo/sample-initial.amo

19 lines
358 B
Plaintext
Raw Normal View History

MyType: Type
MyType = type
Variant1
| Variant2 (int 0..usize)
| Variant3 str (int 0..21)
2022-04-06 13:23:46 +00:00
myFunc: str, int -> MyType
myFunc strval intval =
if intval < 21 && intval > 0
then Variant3 strval intval
else Variant1
ComplexType: Type
ComplexType = type
ComplexVariant (str, int -> MyType) str
2022-04-06 13:23:46 +00:00
myVal : ComplexType
myVal = ComplexVariant myFunc "uwu~"