ligo/test/contracts/super-counter.mligo

11 lines
238 B
Plaintext
Raw Normal View History

2019-06-12 22:41:29 +04:00
type action =
| Increment of int
| Decrement of int
let main (p : action) (s : int) : (operation list * int) =
let storage =
match p with
| Increment n -> s + n
| Decrement n -> s - n in
(([] : operation list) , storage)