[Maxima-commits] CVS: maxima/share/contrib/graphs graph_core.lisp, 1.15, 1.16



On Mon, May 5, 2008 at 4:48 PM, Raymond Toy (RT/EUS)
<raymond.toy at ericsson.com> wrote:
>  > Use alike1 instead of equal in user defined hash tables.
>  > +  (make-hash-table :test #'alike1))
>
>  You can't use an arbitrary test in a Common Lisp hash table.  Some lisps
>  will allow you to define your own, but that's not portable.

In GCL at least, (make-hash-table :test #'alike1) correctly gives an error.

If Lisp allowed arbitrary test functions, how would determine a
correct hash function?! I suppose a correct, but inefficient, solution
would be to have all non-standard test functions simply put all values
in one bucket, reducing to a linear search.

            -s