def pick.slot

gralha-svg-render@0.1.0.1 · svg.bend:1126

import gralha-svg-render@0.1.0.1/svg.bend as Svg
import Base
import gralha-text-scan@0.1.0.1/scan.bend as U

1126def pick.slot(k: String) -> U32:
1127  match k:
1128    case SNil{}: 0
1129    case SCon{Chr{c}, t}:
1130      +ch = c
1131      +key = {SCon{Chr{ch}, t} : String}
1132      U.choose(U32, U32.is_eq(ch, 102), pick.slot.f(key), U.choose(U32, U32.is_eq(ch, 115), pick.slot.s(key), U.choose(U32, U32.is_eq(ch, 109), pick.slot.m(key), pick.slot.other(key, ch))))

Uses (9)

Used by (1)