sequence-hashcode ( depth seq -- x ) - Factor Documentation

sequence-hashcode ( depth seq -- x )


Vocabulary
sequences

Inputs
depth an integer
seq a sequence


Outputs
x an integer


Word description
Iterates over a sequence, computes a hashcode with hashcode* for each element, and combines them.

Definition
USING: kernel sequences.private ;

IN: sequences

: sequence-hashcode ( depth seq -- x )
[ 0 ] 2dip [ hashcode* sequence-hashcode-step ] with each ;
inline

AltStyle によって変換されたページ (->オリジナル) /