define-xpath-function/eager (ext name args &body body)
Defines an XPath function, "eager" style.
The body is evaluated during evaluation of XPath expressions each time the function being defined is called. It's passed a list of values corresponding to XPath function arguments and should return a value of one of XPath types (string, boolean, number, node set).
(define-xpath-function/eager my-ext join (delim node-set) (reduce (lambda (a b) (concatenate 'string a delim b)) (map-node-set->list #'string-value node-set)))