def seek
import bolt@1.27.0.0/src/syntax/bind.bend as Bindimport Base
1003# the binders from the first one not before a position on; the binders are in
1004# source order, so none this drops sits at the position. stop is seek.stop of
1005# binds, carried so the step stays a loop
1006def seek(binds: List<&2, Bind>, +line: U32, +col: U32, +stop: Bool) -> List<&2, Bind>:
1007 match binds:
1008 case Nil{}:
1009 Nil{}
1010 case Con{h, +rest}:
1011 match stop:
1012 case True{}:
1013 h <> rest
1014 case False{}:
1015 seek(rest, line, col, seek.stop(rest, line, col))