Bitset.count: def of bend-collections@1.0.0.0 Import: import bend-collections@1.0.0.0/src/containers/bitset.bend as Bitset Lines 278-281 of bend-collections@1.0.0.0/src/containers/bitset.bend: https://jend.leeeet.dev/read.txt?path=bend-collections@1.0.0.0/src/containers/bitset.bend&start_line=278&end_line=281 import Base import bend-collections@1.0.0.0/src/math/pow2.bend as P2 def count(s: Bitset) -> Bitset & Nat: match s: case BS{+n, +d, a}: count_fin(count_go(P2.pow2t(d), (a, 0n), d, 0n), n, d) Uses (7): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Pair https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Sigma https://jend.leeeet.dev/definition.txt?path=bend-collections@1.0.0.0/src/containers/bitset.bend&name=Bitset https://jend.leeeet.dev/definition.txt?path=bend-collections@1.0.0.0/src/containers/bitset.bend&name=count_fin https://jend.leeeet.dev/definition.txt?path=bend-collections@1.0.0.0/src/containers/bitset.bend&name=count_go https://jend.leeeet.dev/definition.txt?path=bend-collections@1.0.0.0/src/math/pow2.bend&name=pow2t