def dash.walk
gralha-svg-render@0.1.0.1 · svg.bend:1371
import gralha-svg-render@0.1.0.1/svg.bend as Svg
import Base
import gralha-text-scan@0.1.0.1/scan.bend as U
1371def dash.walk(+cursor: DashCursor, +all: List<&2, F32>, +position: F32, +total: F32) -> List<&2, DashRun>:
1372 DashCursor{remaining, rest, painted} = cursor
1373 +end = U.min(total, (position + remaining : F32))
1374 +tail = U.branch(List<&2, DashRun>, F32.is_ge(end, total), _ => Nil{},
1375 _ => dash.walk(dash.next(rest, all, Bool.not(painted)), all, end, total))
1376 U.choose(List<&2, DashRun>, painted, Con{DashRun{position, end}, tail}, tail)