def shape
import bend-kit-router@0.2.0.0/router.bend as Routerimport Base
158def shape(a: List<&2, Segment>, b: List<&2, Segment>) -> Bool:
159 match a b:
160 case Nil{} Nil{}:
161 True{}
162 case Literal{x} <> at Literal{y} <> bt:
163 continue(String.eq(x, y), u => shape(at, bt))
164 case Parameter{x} <> at Parameter{y} <> bt:
165 shape(at, bt)
166 case _ _:
167 False{}