ligo/src/test/contracts/super-counter.mligo

11 lines
244 B
Plaintext
Raw Normal View History

2019-06-12 18:41:29 +00:00
type action =
| Increment of int
| Decrement of int
let main (ps : action * int) : (operation list * int) =
2019-06-12 18:41:29 +00:00
let storage =
match ps.0 with
| Increment n -> ps.1 + n
| Decrement n -> ps.1 - n in
2019-06-12 18:41:29 +00:00
(([] : operation list) , storage)