Retry.prune: def of bend-kit-retry@0.3.0.0 Import: import bend-kit-retry@0.3.0.0/retry.bend as Retry Lines 72-78 of bend-kit-retry@0.3.0.0/retry.bend: https://jend.leeeet.dev/read.txt?path=bend-kit-retry@0.3.0.0/retry.bend&start_line=72&end_line=78 import Base # The failure times still inside the window: now < t + window. Newest first, so the first old time ends the list. def prune(+now: Nat, +window: Nat, fs: List<&2, Nat>) -> List<&2, Nat>: match fs: case Nil{}: Nil{} case Con{+t, rest}: Bool.pick(List<&2, Nat>, Nat.is_lt(now, Nat.add(t, window)), Con{t, prune(now, window, rest)}, Nil{}) Uses (5): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.pick 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=Nat.is_lt