Bind.refresh.go: def of bolt@1.27.0.0 Import: import bolt@1.27.0.0/src/syntax/bind.bend as Bind Lines 1026-1046 of bolt@1.27.0.0/src/syntax/bind.bend: https://jend.leeeet.dev/read.txt?path=bolt@1.27.0.0/src/syntax/bind.bend&start_line=1026&end_line=1046 import Base # each binder of an environment, outermost first, with the note its annotated # twin carries, pushed onto acc (so acc ends innermost first again). cur is a # cursor into binds that drops only binders before (tl, tc), the last one # read: an environment's binders were pushed in source order, so each lookup # picks up where the last stopped and binds is read once, not once per # binder. A binder before the last one read starts the cursor over def refresh.go( env: List<&2, Bind>, +binds: List<&2, Bind>, +cur: List<&2, Bind>, +tl: U32, +tc: U32, acc: List<&2, Bind> ) -> List<&2, Bind>: match env: case Nil{}: acc case Con{Bind{name, +l, +c, kind, note}, rest}: +start = Bool.pick(List<&2, Bind>, before(l, c, tl, tc), binds, cur) +from = seek(start, l, c, seek.stop(start, l, c)) refresh.go(rest, binds, from, l, c, noted(seek.head(from, l, c), Bind{name, l, c, kind, note}) <> acc) Uses (9): 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=U32 https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/syntax/bind.bend&name=Bind https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/syntax/bind.bend&name=before https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/syntax/bind.bend&name=noted https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/syntax/bind.bend&name=seek https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/syntax/bind.bend&name=seek.head https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/syntax/bind.bend&name=seek.stop