ligo/src/contracts/super-counter.mligo
2019-06-12 18:41:29 +00: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)