def constructed_head

bendvy-ecs-core@0.1.0.3 · bundle_construction.bend:23

import bendvy-ecs-core@0.1.0.3/bundle_construction.bend as BundleConstruction
import Base
import bundle_pack.bend as B

23def constructed_head(~Ctx:Type,~HR:Type,~HC:Type,~TR:Type,~TC:Type,~Error:Data,~stageTail:Ctx -> TR -> Staged<Ctx,TR,TC,Error>,tail:TR,observed:Ctx & Construction<HR,HC,Error>) -> Staged<Ctx,B.Pack<HR,TR>,B.Pack<HC,TC>,Error>:
24  match observed:
25    case (ctx,Constructed{head,undo}): constructed_tail(~Ctx,~HR,~HC,~TR,~TC,~Error,head,undo,stageTail(ctx,tail))
26    case (ctx,Invalid{head,error}): invalid_tail(~Ctx,~HR,~HC,~TR,~TC,~Error,head,error,stageTail(ctx,tail))

Uses (7)

Used by (1)