ligo/src/test/contracts/variant-matching.ligo

12 lines
188 B
Plaintext
Raw Normal View History

2019-05-13 00:56:22 +04:00
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)