def segments.at

gralha-svg-render@0.1.0.1 · svg.bend:1676

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

1676def segments.at(xs: List<&2, Segment>, +d: F32, +fallback: Point) -> Point:
1677  match xs:
1678    case Nil{}: fallback
1679    case Con{h, Nil{}}: segment.at(h, d)
1680    case Con{h, Con{g, t}}:
1681      +hh = h
1682      U.branch(Point, segment.reaches(hh, d), _ => segment.at(hh, d), _ => segments.at(Con{g, t}, d, fallback))
1683
1684@unsafe

Uses (7)

Used by (3)