James Mastros wrote:
> This runs afoul of the halting problem real quick.  

That would be taking the entirely wrong approach.
All you'd need to do is check the return values from multiple
calls with the same arguments.  As long as they appear
idempotent, that's all you care about.


> My intuition says that it will either be sorted, for a simple def of sorted
> ($s[i] <= $s[i+1]), or will take infinite time.  (The "take infinite time"
> is, I assume, the one that made things dump core.)

Well, your intuition is not serving you well.  You're mistaken
on both counts.


> > Hm. We could call that "relative idempotency", I suppose.
> 
> I'd go with "transitive", since this is a property of the comparator,
> not the  extractor.  

It's relative, because while the return values doen't need to be
exactly the same each time, they only need to have the same 
signum(difference()).


> If you seperate the comparator and the extractor(s), then the comparator
> must be transitive, and the extractors must be internaly stateless.

Must be?  I think not.


> > Give the braindead no head.
> 
> You might want to change that to "heed".

I definitely do not.  The whole reason I put it in my .sig
is because I like the way it sounds.
If you find it offensive, well, I'll have a new one soon.

-- 
John Porter

Reply via email to