def osa.cell.swap
import shake@0.7.0.0/src/cli.bend as Cliimport Base
2272# the cheaper of a cell and a swap from two rows up and two cells left
2273def osa.cell.swap(swap: Bool, +best: Nat, +far: Nat) -> Nat:
2274 Bool.pick(Nat, swap, Nat.min(best, 1n+far), best)