def name_exists_bare
bendvy-ecs-core@0.1.0.3 · schema_fragments.bend:89
import bendvy-ecs-core@0.1.0.3/schema_fragments.bend as SchemaFragments
import Base
89def name_exists_bare(~S: Data,xs: List<&2,Entry<S>>,+kind: RegistryKind,+name: String) -> Bool:
90 match xs:
91 case Nil{}: False{}
92 case Con{Entry{other,_,otherName},rest}: Bool.or(Bool.and(same_kind(kind,other),String.eq(name,otherName)),name_exists_bare(~S,rest,kind,name))
93 case Con{Classified{other,_,otherName,_},rest}: Bool.or(Bool.and(same_kind(kind,other),String.eq(name,otherName)),name_exists_bare(~S,rest,kind,name))