def cut.last
import ezx@1.11.0.0/src/ws/workspace.bend as Workspaceimport Base
34# the last segment, kept when it is the word and nothing otherwise
35def cut.last(hit: Bool) -> Maybe<&2, List<&2, String>>:
36 match hit:
37 case True{}:
38 Some{[]}
39 case False{}:
40 None{}