function claimSlot(state) { const claimed = state[0]; const capacity = state[1]; if (claimed >= capacity) return false; state[0] = claimed + 1; return true; }