CSData >>
 Sum : Integer : 2^64
 Mixture : Integer : 2^8
;

/* * */

HashIndex ->
Arg Items : List : Integer <- I|F|S 
    Bits = 64

Sum, Mixture = 0 ..

Do CS 'Sum Mixture' Key,
   CS 'Sum Mixture' Value
With Key, Value from Items

If Sum > 2 ^ Bits then 
 Sum = Sum %% (2 ^ Bits)
;

Sum

/

CS HashIndex ->
Arg D : ^&CSData, X : I|F|S

Array : _ : Integer : 2^8 <- X

Do D.Mixture = Mix D.Mixture Byte,
   D.Sum = Hash D.Sum D.Mixture
With Byte from Array

/

Hash CS = Shift ?(Sum) TO_HIGHER 1 B_CR,
          BitMask Sum ? B_XOR

Mix CS = BitMask ? ? B_XOR
