Core.window_rounds: def of mylsm-lsm-store@0.6.0.1 Import: import mylsm-lsm-store@0.6.0.1/src/hub_sha/core.bend as Core Lines 152-163 of mylsm-lsm-store@0.6.0.1/src/hub_sha/core.bend: https://jend.leeeet.dev/read.txt?path=mylsm-lsm-store@0.6.0.1/src/hub_sha/core.bend&start_line=152&end_line=163 import Base import mylsm-lsm-store@0.6.0.1/src/hub_sha/state.bend as S # A fixed rolling window drops schedule words as soon as they are older than 16 # rounds. This avoids growing and reference-counting the reverse history list. def window_rounds(rounds_left: Nat, win: ShaWindow, ks: List<&2, U32>, state: S.State) -> S.State: match rounds_left win ks: case 0n _ _: state case 1n+q _ Nil{}: state case 1n+q W{a, +b, c, d, e, f, +g, h, i, j, l, m, o, r, +t, +u} k <> kt: +w = (small1(b) + g + small0(t) + u : U32) window_rounds(q, W{w, a, b, c, d, e, f, g, h, i, j, l, m, o, r, t}, kt, step(state, k, w)) Uses (9): 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=U32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.add https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/hub_sha/core.bend&name=ShaWindow https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/hub_sha/core.bend&name=small0 https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/hub_sha/core.bend&name=small1 https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/hub_sha/core.bend&name=step https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/hub_sha/state.bend&name=State