def failures

bendvy-ecs-core@0.1.0.4 · inspector_failure_projection.bend:29

import bendvy-ecs-core@0.1.0.4/inspector_failure_projection.bend as InspectorFailureProjection
import Base
import bendvy-ecs-core@0.1.0.4/relation_commands.bend as A
import bendvy-ecs-core@0.1.0.4/relation_types.bend as G

29# Extract relation failures matching the descriptor key, preserving notice order.
30# Other notice variants are omitted; no payload owners or reader positions change.
31def failures(~S:Data,~E:Data,+relation:G.Descriptor<S>,notices:List<&2,A.Notice<S,E>>) -> List<&2,G.Failure<S>>:
32  match notices:
33    case []:[]
34    case notice <> rest:select_notice(~S,~E,relation,notice,failures(~S,~E,relation,rest))

Uses (5)

Used by (1)