on 492ae2f help sign in
35 lines 516 B history raw
1### `++fnv`
3Hashes an atom with the 32-bit FNV non-cryptographic hash algorithm.
4Multiplies `a` by the prime number 16,777,619 and then takes the block
5of size 5 off the product's end, producing an atom.
7Accepts
8-------
10`a` is an atom.
12Produces
13--------
15An atom.
18Source
19------
21 ++ fnv |=(a/@ (end 5 1 (mul 16.777.619 a))) :: FNV scrambler
23Examples
24--------
26 ~zod/try=> (fnv 10.000)
27 272.465.456
28 ~zod/try=> (fnv 10.001)
29 289.243.075
30 ~zod/try=> (fnv 1)
31 16.777.619
35***