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

11 lines
238 B
Plaintext

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)