Re: User-defined EQUALP
From: Adam Warner (usenet_at_consulting.net.nz)
Date: 10/14/04
- Previous message: Pascal Bourguignon: "Re: Lisp benefits against other functional programming languages"
- In reply to:(deleted message) Ingvar: "Re: User-defined EQUALP"
- Next in thread: Ingvar: "Re: User-defined EQUALP"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 14 Oct 2004 20:23:33 +1300
Hi Ingvar,
> I bashed together (what looks like) generic hash table code, with
> user-supplied "equals" function and user-supplied "make a hash"
> function, with a determinable initial hash size.
...
> If enough people are interested, I could probably make the code
> available somewhere.
Please do. The standard provides no appropriate hash table predicate for
case sensitive vectors of strings:
(equal #("Adam" "Warner") #("Adam" "Warner")) => nil, assuming the literal
vectors aren't coalesced by the compiler.
While (equalp #("Adam" "Warner") #("Adam" "Warner")) is true, so is
(equalp #("Adam" "Warner") #("AdAm" "WaRnEr")).
For this data structure EQUAL doesn't work as a case sensitive version of
EQUALP. It works with lists but breaks with vectors.
Regards,
Adam
- Previous message: Pascal Bourguignon: "Re: Lisp benefits against other functional programming languages"
- In reply to:(deleted message) Ingvar: "Re: User-defined EQUALP"
- Next in thread: Ingvar: "Re: User-defined EQUALP"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|