QueueProof.remove_ordered: def of bend-kit-scheduler@0.4.1.0 Import: import bend-kit-scheduler@0.4.1.0/queue_proof.bend as QueueProof Lines 173-185 of bend-kit-scheduler@0.4.1.0/queue_proof.bend: https://jend.leeeet.dev/read.txt?path=bend-kit-scheduler@0.4.1.0/queue_proof.bend&start_line=173&end_line=185 import Base import bend-kit-collections@0.1.4.1/heap.bend as H import bend-kit-scheduler@0.4.1.0/queue.bend as Q import bend-kit-scheduler@0.4.1.0/queue_laws.bend as L def remove_ordered(~A: Data, +h: H.Heap>, +i: Nat, +eh: L.ordered(A, h)) -> L.ordered(A, Q.remove.heap(~A, h, i)): match h: case H.HLeaf{}: Unit{} case H.HNode{n, t, l, r}: L.Both{L.Both{el, er}, L.Both{ol, or}} = eh +l2 = Q.remove.heap(~A, l, i) +r2 = Q.remove.heap(~A, r, i) +ol2 = remove_ordered(~A, l, i, ol) +or2 = remove_ordered(~A, r, i, or) split(c => L.ordered(A, Q.remove.heap.keep(~A, c, t, l2, r2)), Nat.is_eq(Q.id(A, t), i), e => merge_ordered.full(~A, l2, r2, ol2, or2), e => L.Both{L.Both{remove_all(~A, L.bound.ticket(A, t), l, i, el), remove_all(~A, L.bound.ticket(A, t), r, i, er)}, L.Both{ol2, or2}}) Uses (14): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.is_eq https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Unit https://jend.leeeet.dev/definition.txt?path=bend-kit-collections@0.1.4.1/heap.bend&name=Heap https://jend.leeeet.dev/definition.txt?path=bend-kit-scheduler@0.4.1.0/queue.bend&name=Ticket https://jend.leeeet.dev/definition.txt?path=bend-kit-scheduler@0.4.1.0/queue.bend&name=id https://jend.leeeet.dev/definition.txt?path=bend-kit-scheduler@0.4.1.0/queue.bend&name=remove.heap https://jend.leeeet.dev/definition.txt?path=bend-kit-scheduler@0.4.1.0/queue.bend&name=remove.heap.keep https://jend.leeeet.dev/definition.txt?path=bend-kit-scheduler@0.4.1.0/queue_laws.bend&name=Both https://jend.leeeet.dev/definition.txt?path=bend-kit-scheduler@0.4.1.0/queue_laws.bend&name=bound.ticket https://jend.leeeet.dev/definition.txt?path=bend-kit-scheduler@0.4.1.0/queue_laws.bend&name=ordered https://jend.leeeet.dev/definition.txt?path=bend-kit-scheduler@0.4.1.0/queue_proof.bend&name=merge_ordered.full https://jend.leeeet.dev/definition.txt?path=bend-kit-scheduler@0.4.1.0/queue_proof.bend&name=remove_all https://jend.leeeet.dev/definition.txt?path=bend-kit-scheduler@0.4.1.0/queue_proof.bend&name=split