ligo/src/test/contracts/variant-matching.ligo
2019-09-15 13:12:19 +02:00

12 lines
188 B
Plaintext

type foobar is
| Foo of int
| Bar of bool
| Kee of nat
function fb(const p : foobar) : int is
block { skip } with (case p of
| Foo (n) -> n
| Bar (t) -> 42
| Kee (n) -> 23
end)