Package net.sf.saxon.functions.hof
package net.sf.saxon.functions.hof
The package com.saxonica.functions.hof
contains code to support higher-order functions.
Higher-order functions are supported in XSLT 3.0, XPath 3.1, and XQuery 3.1, in Saxon-PE and Saxon-EE only.
The package includes code to support both the core facilities of dynamic creation and invocation of function
objects, and also specific higher-order functions defined in the Functions and Operators library
such as fn:filter
, fn:for-each
and fn:fold-left
.
-
ClassesClassDescriptionA function item representing a constructor function for an atomic type.A Callable that wraps another Callable and a Dynamic Context, in effect acting as a closure that executes the original callable with a saved context.A function item obtained by coercing a supplied function; this adds a wrapper to perform dynamic type checking of the arguments in any call, and type checking of the result.A function obtained by currying another function, that is, the result of calling fn:partial-applyThis class implements the function fn:filter(), which is a standard function in XQuery 3.0This class implements the function fn:fold-left(), which is a standard function in XPath 3.0This class implements the function fn:fold-right(), which is a standard function in XQuery 1.1This class implements the function fn:for-each() (formerly fn:map), which is a standard function in XQuery 3.0This class implements the function fn:for-each-pair() (formerly fn:map-pairs()), which is a standard function in XQuery 3.0This class implements the function function-arity(), which is a standard function in XPath 3.0A FunctionLiteral is a wrapper around a FunctionItem; it is an expression, whose value is the function that it wraps.This class supports the function-lookup() function in XPath 3.0.This class implements the function function-name(), which is a standard function in XPath 3.0An FunctionSequenceCoercer is an expression that performs function coercion on a sequence of function items: it takes a sequence of supplied items as input, and wraps each one in a CoercedFunction value, which dynamically converts the supplied arguments to the required type, and converts the result in the opposite direction, or throws a type error if conversion is not possible.This class implements the function load-xquery-module(), which is a standard function in XPath 3.1.This expression class implements the operation of currying (or performing partial application) of a function.This class implements the function random-number-generator(), which is a standard function in XPath 3.1This class implements the function fn:sort#2, which is a higher-order function in XPath 3.1 available only in Saxon-PE and aboveA Callable that wraps another Callable and a Dynamic Context, in effect acting as a closure that executes the original callable with a saved context.A UserFunctionReference is an expression in the form local:f#1 where local:f is a user-defined function.A BoundUserFunction represents a user-defined function seen as a component.