def tools.firsts
import ezx@1.11.0.0/src/ws/joint.bend as Jointimport Base
import ezx@1.11.0.0/src/ledger/manifest.bend as M
143# every tool, each name once, at its first declaration
144def tools.firsts(ts: List<&2, M.Tool>) -> List<&2, M.Tool>:
145 match ts:
146 case []:
147 []
148 case +hd <> tl:
149 hd <> tools.without(tools.firsts(tl), M.tool.name(hd))