A when - , . , , . , , ", | y -> .. , ", .
, . , when , (, , , ..). .
if ... then .. else if .. then .. else.
if z = x then "foo"
else if z = y then "bar"
else "baz"
when? , , ( ..) , . if..then..else.
, , ( ):
match foo with
| (Baz x) when pred x -> ...
| _ -> ...