[plt-scheme] How to make unit functors?

From: Jens Axel Søgaard (jensaxel at soegaard.net)
Date: Wed May 28 12:35:05 EDT 2003

Matthew Flatt wrote:


>> Is the same also true for symbols? That is does it hold for two
>> symbols s1 and s2 that
>>
>>   (= (eq-hash-code s1) (eq-hash-code s2)) =  (symbol=? s1 s2)
>>
>> ?
>
> Yes. `symbol=?' is `eq?' with its domain restricted to symbols.

Sorry, I intended to ask this question:

  Is the same also true for symbols? That is does it hold for two
  symbols s1 and s2 that

     (= (eq-hash-code s1) (eq-hash-code s2)) =>  (symbol=? s1 s2)
  ?

[otherwise the question is a bit silly]

I interpreted the prose describing eq-hash-code as

For all fixnums f1 and f2:

  (= (eq-hash-code f1) (eq-hash-code f2)) =>  (= f1 f2)

and wanted to know if it also holds for symbols.

--
Jens Axel Søgaard



Posted on the users mailing list.