def hash
import bolt@1.27.0.0/src/lsp/semantic.bend as Semanticimport Base
195# a name's key: its chars folded, base 31
196def hash(ss: String, +acc: U32) -> U32:
197 match ss:
198 case SNil{}:
199 acc
200 case SCon{c, t}:
201 hash(t, (acc * 31 + Char.to_u32(c) : U32))