Re: Re: Function memoization

Frans Englich <[email protected]>
Newsgroups gmane.text.xml.xslt.extensions
Message-ID <[email protected]>
On Friday 14 July 2006 11:12, Colin Paul Adams wrote:
> >>>>> "Florent" == Florent Georges <[email protected]> writes:
>
>     Colin> This is no good. That means two functions calls that pass the
>     Colin> value 3 will not (usually) be memoized.
>
>     Florent>   Maybe it would make sense to say:
>
>     Florent>     - if the argument is an atomic item (or a sequence of
>     Florent> 1 such item, as these are indistinguishable), compare by
>     Florent> value (string() or data()?);
>
> Good.
>
>     Florent>     - if the argument is a node, compare with the "is"
>     Florent> operator;
>
> Good.
>
>     Florent>     - else (so if it is a sequence of at least 2 items),
>     Florent> compare by identity (the two sequences must be the same
>     Florent> one).  I think such a "sequence identity" doesn't exist
>     Florent> in the CRs.
>
> Re-formulate that as compare each item of the sequence of identity as
> determined above.

Perhaps it's better to simply map it into a call to fn:deep-equal()? Seems to 
simply spec'ing it.

(Not that I'm in favor or against the idea as a whole.)


Cheers,

		Frans
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.