HashTable.set: def of bend-collections@1.0.0.0
Import: import bend-collections@1.0.0.0/src/containers/hash_table.bend as HashTable
Lines 452-455 of bend-collections@1.0.0.0/src/containers/hash_table.bend: https://jend.leeeet.dev/read.txt?path=bend-collections@1.0.0.0/src/containers/hash_table.bend&start_line=452&end_line=455
import Base
# Insert key -> x, replacing any value already stored under key.
def set(a, -V: Kind(a), m: HashMap, key: String, x: V) -> HashMap:
HM{+n, +mask, +td, +fresh, +sz, +sd, +free, tab, ks, vs, nx} = m
set_f(a, V, n, mask, td, fresh, sz, sd, free, vs, nx, x, probe(tab, ks, mask, key))
Uses (4):
https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String
https://jend.leeeet.dev/definition.txt?path=bend-collections@1.0.0.0/src/containers/hash_table.bend&name=HashMap
https://jend.leeeet.dev/definition.txt?path=bend-collections@1.0.0.0/src/containers/hash_table.bend&name=probe
https://jend.leeeet.dev/definition.txt?path=bend-collections@1.0.0.0/src/containers/hash_table.bend&name=set_f