ligo/src/contracts/variant-matching.ligo
2019-05-14 17:53:44 +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)