Core.next_word: 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 85-93 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=85&end_line=93 import Base # Schedule histories always contain at least 16 words. Destructuring that prefix # avoids four independent linked-list walks for every expanded word; the fallback # preserves the total behavior used by the universal refinement theorem. def next_word(+history: List<&2, U32>) -> U32: match history: case a <> b <> c <> d <> e <> f <> g <> h <> i <> j <> k <> l <> m <> n <> o <> (p <> rest): (small1(b) + g + small0(o) + p : U32) case _: next_word_slow(history) Uses (6): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List 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=next_word_slow 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