contract Counter = record state = { value : int } function init(val) = { value = val } function get() = state.value function tick() = put(state{ value = state.value + 1 })