Dan Sugalski wrote:
> 
> At 09:50 PM 3/26/2001 -0500, James Mastros wrote:

[..]

> >I'd think /perl/ should complain if your comparison function isn't
> >idempotent (if warnings on, of course).  If nothing else, it's probably an
> >indicator that you should be using that schwartz thang.
> 
> If you figure out how, tell me. I'd like to make arrangements to be there
> for your Nobel acceptance speech. :) (This is, alas, a variant on the
> halting problem, unless you're proposing perl do the memoizing *and* still
> call the functions, and complain if one doesn't match the other)

not wanting to collect my nobel prize just yet, but...

could you not try a simple test (not guaranteed to be 100% accurate though),
by copying the first data element and apply it twice and then check to see
that the result of applying it once is the same as applying it twice. Ideally
you could do they typical matrix type thing (getting technical again :)

        I x A = I x A x A
        A = A^2

So it would be easy if we could have an identity data element on hand, but
even if we don't it is pretty unlikely that the data element will special
enough to make the above true (substitute the data element for I).

just some early morning dribble,

peter

Reply via email to