Re: Extension candidates

Florent Georges <[email protected]> Sun, 14 Dec 2008 18:53:36 +0100 (CET)
Newsgroups gmane.text.xml.xslt.extensions
Message-ID <[email protected]>
Dimitre Novatchev wrote:

> I don't know details of your implementation of HOF in XQuery, but in
> XSLT (FXSL) closures are implemented as partial (curried)
> applications.

>   If the function f(x, y) is defined to have two arguments, then

>     f(x)

> returns a new function g(y) of just one argument.

> g() needs to store internally the given value for x, and here is the
> moment when we need a reference to x. A copy of x is OK for atomic
> values, but may not be OK for nodes and sequences, containing not
> only atomic values.

> This is exactly the issue that was recently raised by Christoph
> Lange about currying with FXSL and it was quickly clear that this is
> not just an FXSL problem, but a problem with any potential
> implementation of higher-order functions.

  I think this is in favour of Michael's suggestion to use a third,
implementation-defined kind of item.

  Regards,

-- 
Florent Georges
http://www.fgeorges.org/