def key_exists_bare
bendvy-ecs-core@0.1.0.3 · schema_fragments.bend:83
import bendvy-ecs-core@0.1.0.3/schema_fragments.bend as SchemaFragments
import Base
83def key_exists_bare(~S: Data,xs: List<&2,Entry<S>>,+kind: RegistryKind,+key: String) -> Bool:
84 match xs:
85 case Nil{}: False{}
86 case Con{Entry{other,otherKey,_},rest}: Bool.or(Bool.and(same_kind(kind,other),String.eq(key,otherKey)),key_exists_bare(~S,rest,kind,key))
87 case Con{Classified{other,otherKey,_,_},rest}: Bool.or(Bool.and(same_kind(kind,other),String.eq(key,otherKey)),key_exists_bare(~S,rest,kind,key))