def distinct

ezx@1.11.0.0 · src/ws/workspace.bend:338

import ezx@1.11.0.0/src/ws/workspace.bend as Workspace
import Base

338# whether no name is in the list twice
339def distinct(ns: List<&2, String>) -> Bool:
340  match ns:
341    case []:
342      True{}
343    case +hd <> +tl:
344      rest = distinct(tl)
345      Bool.and(Bool.not(named(tl, hd)), rest)

Uses (6)

Used by (1)