You can get a memory pointer to a lisp object.

a:=Fraction(Integer)

returns the "memory location of Fraction(Integer)"
You can prove this with

b:=Fraction(Integer)
EQ(a,b)$Lisp

The lisp function EQ compares memory pointers.

There is a lisp function to get the hash value of any object
call sxhash. You can call it.

SXHASH(a)$Lisp

Note that if

c:=Integer

then
EQ(a,c)$Lisp is false
SXHASH(a)$Lisp is not equal to SXHASH(c)$Lisp

Thus the hash function you seek already exists.
You just have to accept the fact that Spad is only syntactic
sugar for lisp code and lisp is not evil.

Tim



_______________________________________________
Axiom-developer mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/axiom-developer

Reply via email to