def word_count
import bend-collections@1.0.0.0/src/containers/bitset.bend as Bitsetimport Base
102# Number of set bits among the low m bits of w.
103def word_count(m: Nat, +w: U32) -> Nat:
104 match m:
105 case 0n:
106 0n
107 case 1n+p:
108 Nat.add(bit_value(low(w)), word_count(p, U32.shr(w)))
Uses (6)
Used by (0)
No other definition uses this definition.