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

11 lines
259 B
Plaintext

type action is
| Increment of int
| Decrement of int
function main (const p : action ; const s : int) : (list(operation) * int) is
block {skip} with ((nil : list(operation)),
case p of
| Increment (n) -> s + n
| Decrement (n) -> s - n
end)