def lc.tab.set.go

bend-osdev-legacy-ciphers@0.1.0.0 · legacy_ciphers.bend:311

import bend-osdev-legacy-ciphers@0.1.0.0/legacy_ciphers.bend as LegacyCiphers
import Base

311def lc.tab.set.go(t: LcTab, path: List<&2, Bool>, v: U32) -> LcTab:
312  match t:
313    case LcLeaf{w}:
314      LcLeaf{v}
315    case LcNode{l, r}:
316      match path:
317        case Nil{}:
318          LcNode{l, r}
319        case Con{b, rest}:
320          match b:
321            case True{}:
322              LcNode{l, lc.tab.set.go(r, rest, v)}
323            case False{}:
324              LcNode{lc.tab.set.go(l, rest, v), r}

Uses (4)

Used by (1)