[exslt] Reference and First-Class Function
Michael Kay
mike at saxonica.com
Tue Dec 16 11:02:59 MST 2008
It seems to me that even if it's syntactic sugar, allowing people to write
call($function, 1, 2, 3)
is a lot more usable than requiring them to write
call(curry(curry(curry($function, 1), 2), 3))
or even
call($function, (ref(1), ref(2), ref(3)))
Michael Kay
http://www.saxonica.com/
> >>
> >> > An alternative is to define single call syntax:
> >> > ex:function(xs:QName('my:add'));
> >> > ex:call($function, $argument);
> >>
> >> But what if your function takes several parameters?
> >
> > In principle it's enough to support one argument function,
> taking into
> > account that $argument can be a reference. That one
> argument function
> > can forward a call to a real destination. In fact a pair
> ($function,
> > $argument) can be thought as a function-object.
>
> In fact $function can be just xs:QName.
> The pair ($function, $argument) allows to model curry
> functions, while types of $function, and $argument can be
> serialized in some way.
> --
> Vladimir Nesterovsky
> http://www.nesterovsky-bros.com
>
>
>
> _______________________________________________
> exslt mailing list
> list at exslt.org
> http://www.exslt.org/list
More information about the exslt
mailing list