passing functions

here’s food for thought:

what stops us from allowing functions to be passed as parameters to functions in XQuery?..

We can say that parameters are data and this data has to be describable by XSD. Functions take one type and return another. This we can’t state in XSD… BUT if we take the “red pill” and think about how fuction declarations look like in XQueryX then a passed function can be described by a XSD. This leaves us with the problem that our XSD schema describing the incomming XQueryX function declaration needs to state what the actual values in head of the declaration (which state the functions type) actually are (… can this be done in XSD?)

Do you know if this has already been discussed by the Working group? Wouldn’t it be cool if we could pass functions!


higher order functions to my knowledge have often
been discussed in the working group but never made
it into XQuery.
Actually quip v 1.6.1 had some very simple means
to pass a function by it name as string value.
If you look in the prelude.xquery of quip 1.6.1
then you will find an example for its use.