JanetDocsPlaygroundI'm feeling luckyGitHub sign in

hash



    cfunction
    src/core/corelib.c on line 556, column 1

    (hash value)

    Gets a hash for any value. The hash is an integer can be used as a 
    cheap hash function for all values. If two values are strictly 
    equal, then they will have the same hash value.


1 exampleSign in to add an example
Loading...
(map hash [nil true false -1 0 3.14 :a "foo" [1 2 3] {:a 1} (fn [])])
# => @[0 1 0 -1074790400 0 1244950043 -2107123988 -1254832049 -2021739803 -1395744911 53378043]
cellularmitosisPlayground