RequestQueue.cancel.fold.retained: def of mylsm-lsm-store@0.6.0.1 Import: import mylsm-lsm-store@0.6.0.1/src/coordinator/RequestQueue.bend as RequestQueue Lines 409-418 of mylsm-lsm-store@0.6.0.1/src/coordinator/RequestQueue.bend: https://jend.leeeet.dev/read.txt?path=mylsm-lsm-store@0.6.0.1/src/coordinator/RequestQueue.bend&start_line=409&end_line=418 import Base def cancel.fold.retained( state: CancelFold, measured: Pending & Nat ) -> CancelFold: match state: case CancelFold{kept, cancelled, count, bytes}: match measured: case (pending, size): CancelFold{Con{pending, kept}, cancelled, Nat.add(count, 1n), Nat.add(bytes, size)} Uses (7): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.add https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Pair https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Sigma https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/coordinator/RequestQueue.bend&name=CancelFold https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/coordinator/RequestQueue.bend&name=Pending