Table of Contents
A hash! value provides a block-like interface with fast lookups.
The underlying hashing function is a custom implementation of the MurmurHash3 algorithm.
Hash! is a member of the following typesets: default!, series!, any-block!, any-list!
Getting a value, using c as a key.
>> list/c
== 789Setting a value, using c as a key.
>> list/c: 42
== 42
>> list
== make hash! [a 123 "hello" b c 42]The following data set operations are possible with hash values: difference, exclude, intersect, union, unique
>> dict1: make hash! [a 123 b 456 c 789]
== make hash! [a 123 b 456 c 789]
>> dict2: make hash! [2 123 4 456 6 2 8 789]
== make hash! [2 123 4 456 6 2 8 789]>> difference dict1 dict2
== make hash! [a b c 2 4 6 8]>> exclude dict1 dict2
== make hash! [a b c]>> intersect dict1 dict2
== make hash! [123 456 789]>> union dict1 dict2
== make hash! [a 123 b 456 c 789 2 4 6 8]>> unique dict2
== make hash! [2 123 4 456 6 8 789]All comparators can be applied on hash!: =, ==, <>, >, <, >=, <=, =?. In addition, min, and max are also supported.
Use hash? to check if a value is of the hash! datatype.
>> hash? dict1
== trueUse type? to return the datatype of a given value.
>> type? dict2
== hash!