def occupied2

cswap-bend-cli@0.1.0.0 · store/plan.bend:213

import cswap-bend-cli@0.1.0.0/store/plan.bend as Plan
import Base

213def occupied2(+same: Bool, +assume_yes: Bool, +num: String, +other: String) -> SlotPlan:
214  match same assume_yes:
215    case True{} _:
216      SPOk{num, None{}, None{}}
217    case False{} True{}:
218      SPOk{num, Some{num}, None{}}
219    case False{} False{}:
220      SPErr{10, "Slot " ++ num ++ " already occupied by " ++ other}

Uses (5)

Used by (1)