def count_unknown
import bend-schema-lib@0.4.1.0/core.bend as Coreimport Base
1395# ---- the claim the strict law makes ----
1396#
1397# How many keys of r are not in ns, counted rather than walked with a
1398# Bool.and: a second algorithm, so that a no_extra that lets a key through
1399# (or refuses a named one) disagrees with it.
1400def count_unknown(+ns: List<&2, String>, r: Raw) -> Nat:
1401 match r:
1402 case RKey{+k, v, o}:
1403 Nat.add(one_if_there(in_names(k, ns)), count_unknown(ns, o))
1404 case _:
1405 0n
Uses (7)
Used by (0)
No other definition uses this definition.