summaryrefslogtreecommitdiff
path: root/test/stdopt-mk.myr
blob: dc97f7f74805ce7bd09381a4ffe99c37863d88e6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
use std

const f = {x
	if x == 123
		-> `std.Some 42
	else
		-> `std.None
	;;
}

const main = {
	var v
	
	v = f(123)
	match v
	| `std.Some x:	-> x
	| `std.None:	-> 123
	;;
}