def bitw.ffs.step
import bend-osdev-algo@0.1.0.0/algo.bend as Algoimport 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