Redirect.redirect.dots: def of emerging-ezhttp@0.21.0.0 Import: import emerging-ezhttp@0.21.0.0/src/redirect.bend as Redirect Lines 75-84 of emerging-ezhttp@0.21.0.0/src/redirect.bend: https://jend.leeeet.dev/read.txt?path=emerging-ezhttp@0.21.0.0/src/redirect.bend&start_line=75&end_line=84 import Base # a path's segments with dot segments removed, `out` holding those kept so # far, last first def redirect.dots(ss: List<&2, String>, out: List<&2, String>) -> List<&2, String>: match ss: case []: List.reverse(&2, String, out) case +s <> +t: redirect.dots.one(String.eq(s, "."), String.eq(s, ".."), List.is_empty(&2, String, t), s, out, o => redirect.dots(t, o)) Uses (6): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List.is_empty https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List.reverse https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String.eq https://jend.leeeet.dev/definition.txt?path=emerging-ezhttp@0.21.0.0/src/redirect.bend&name=redirect.dots.one