2019-05-13 00:56:22 +04:00
|
|
|
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
|
2019-06-13 18:57:40 +04:00
|
|
|
| Increment (n) -> s + n
|
|
|
|
| Decrement (n) -> s - n
|
2019-05-13 00:56:22 +04:00
|
|
|
end)
|