def bitw.ffs.step

bend-osdev-algo@0.1.0.0 · algo.bend:53

import bend-osdev-algo@0.1.0.0/algo.bend as Algo
import Base

53# k is ffs of the bits above the lowest one
54def bitw.ffs.step(b: Bool, k: Nat) -> Nat:
55  match b:
56    case True{}:
57      1n
58    case False{}:
59      match k:
60        case 0n:
61          0n
62        case 1n+j:
63          2n+j

Uses (2)

Used by (7)