term_hash/3

term_hash(+ Term, ? Hash)*

If Term is ground unify Hash with a positive integer calculated from the structure of the term. Otherwise the argument Hash is left unbound. The range of the positive integer is from 0 to, but not including, 33554432.