2019-06-12 18:41:29 +00:00
|
|
|
type action =
|
|
|
|
| Increment of int
|
|
|
|
| Decrement of int
|
|
|
|
|
2020-01-08 20:58:26 +00:00
|
|
|
let main (ps : action * int) : (operation list * int) =
|
2019-06-12 18:41:29 +00:00
|
|
|
let storage =
|
2020-01-08 20:58:26 +00:00
|
|
|
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)
|