pub fn handle(ctx, state, sender, message) { let state = match state { () => 0, state => state }; if message.op == "inc" { let new_state = state + 1; ctx.info(`New State: ${new_state}`); ctx.send(ctx.this, #{op: "inc"}); new_state } else { panic("unknown counter operation") } }