def del

bolt@1.27.0.0 · src/lsp/docs.bend:14

import bolt@1.27.0.0/src/lsp/docs.bend as Docs
import Base

14# the documents without the one at a URI
15def del(docs: List<&2, Doc>, +uri: String) -> List<&2, Doc>:
16  match docs:
17    case Nil{}:
18      Nil{}
19    case Con{Doc{+u, t, e, m}, r}:
20      +rest = del(r, uri)
21      Bool.pick(List<&2, Doc>, String.eq(u, uri), rest, Doc{u, t, e, m} <> rest)

Uses (5)

Used by (3)