ligo/src/test/contracts/super-counter.mligo
John David Pressman 71989876db Fix a bug, test added:
A never accounted message was not adding anything to the map
2020-01-08 20:58:26 +00:00

11 lines
244 B
Plaintext

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