def has_key

bend-schema-lib@0.4.1.0 · core.bend:443

import bend-schema-lib@0.4.1.0/core.bend as Core
import Base

443# k is a key of the object r.
444def has_key(+k: String, r: Raw) -> Bool:
445  match r:
446    case RKey{j, v, o}:
447      Bool.or(String.eq(k, j), has_key(k, o))
448    case _:
449      False{}

Uses (5)

Used by (1)