def twice
import ezx@1.11.0.0/src/ws/workspace.bend as Workspaceimport Base
347# the first name in the list twice, "" for none
348def twice(ns: List<&2, String>) -> String:
349 match ns:
350 case []:
351 ""
352 case +hd <> +tl:
353 rest = twice(tl)
354 Bool.pick(String, named(tl, hd), hd, rest)