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

14 lines
228 B
Plaintext

type storage = int
type param =
Add of int
| Sub of int
let%entry main (p : param) storage =
let storage =
storage +
(match p with
Add n -> n
| Sub n -> 0-n)
in (([] : operation list), storage)