def points.clean.go
gralha-svg-render@0.1.0.1 · svg.bend:1194
import gralha-svg-render@0.1.0.1/svg.bend as Svg
import Base
1194def points.clean.go(near: Bool, +h: Point, t: List<&2, Point>, +previous: Point) -> List<&2, Point>:
1195 match near:
1196 case True{}:
1197 match t:
1198 case Nil{}: Nil{}
1199 case Con{h2, t2}:
1200 +hh = h2
1201 points.clean.go(F32.is_lt(point.distance(hh, previous), 0.0000001), hh, t2, previous)
1202 case False{}:
1203 match t:
1204 case Nil{}: Con{h, Nil{}}
1205 case Con{h2, t2}:
1206 +hh = h2
1207 Con{h, points.clean.go(F32.is_lt(point.distance(hh, h), 0.0000001), hh, t2, h)}