MlbendMetrics.not_empty: def of mlbend-metrics@0.1.0.0 Import: import mlbend-metrics@0.1.0.0/main.bend as MlbendMetrics Lines 192-200 of mlbend-metrics@0.1.0.0/main.bend: https://jend.leeeet.dev/read.txt?path=mlbend-metrics@0.1.0.0/main.bend&start_line=192&end_line=200 import Base # the number of pairs, or why there is no answer def not_empty(r: Result<&1, &1, Bad, Nat>) -> Result<&1, &1, Bad, Nat>: match r: case Done{+n}: not_empty_of(Nat.is_eq(n, 0n), n) case Fail{Mismatch{expected, got}}: Fail{Mismatch{expected, got}} case Fail{Empty{}}: Fail{Empty{}} Uses (5): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.is_eq https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Result https://jend.leeeet.dev/definition.txt?path=mlbend-metrics@0.1.0.0/main.bend&name=Bad https://jend.leeeet.dev/definition.txt?path=mlbend-metrics@0.1.0.0/main.bend&name=not_empty_of