! (HashTable)

Sets a value by key.

Arguments

The

value
to set.
key
to set the value by. If no entry with this key exists, an error will occur.
table
is the HashTable to update.

Return values

None

Complexity

Amortized constant, O(size) in the worst case.

Example

"sl/hashTable" useFile a: ((19 "nineteen") (35 "element") (0 "ZERO") (32 {a:0; b:1;})) makeHashTable; 19 a @ print LF print "NINETEEN" 19 a ! 19 a @ print
Output:
nineteen NINETEEN