@ (HashTable)

Returns a value by key.

Arguments

key
to get an entry by. If no entry with this key exists, an error will occur.
table
is the HashTable to get an entry from.

Return values

value
of the entry.

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