def constructed_tail

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

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

15def constructed_tail(~Ctx:Type,~HR:Type,~HC:Type,~TR:Type,~TC:Type,~Error:Data,head:HC,headUndo:HC -> HR,tail:Staged<Ctx,TR,TC,Error>) -> Staged<Ctx,B.Pack<HR,TR>,B.Pack<HC,TC>,Error>:
16  match tail:
17    case Valid{ctx,cooked,undo,positions}: Valid{ctx,B.Pack{head,cooked},p => undo_pack(~HR,~HC,~TR,~TC,headUndo,undo,p),None{} <> positions}
18    case Failed{ctx,raw,positions}: Failed{ctx,B.Pack{headUndo(head),raw},None{} <> positions}

Uses (5)

Used by (1)