def twice

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

import ezx@1.11.0.0/src/ws/workspace.bend as Workspace
import 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)

Uses (4)

Used by (1)