ligo/src/test/contracts/expected/super-counter.religo
2020-06-03 12:41:26 +02:00

17 lines
353 B
Plaintext

type parameter = Increment(int) | Decrement(int);
type storage = int;
type return = (list(operation), storage);
let main =
((action, store): (parameter, storage)): return =>
{
let store =
switch(action) {
| Incrementn => store + n
| Decrementn => store - n
};
([] : list(operation), store)
};