Package net.sf.saxon.functions.hof
The package com.saxonica.functions.hof
contains code to support higherorder functions.
Higherorder functions are supported in XSLT 3.0, XPath 3.1, and XQuery 3.1, in SaxonPE and SaxonEE only.
The package includes code to support both the core facilities of dynamic creation and invocation of function
objects, and also specific higherorder functions defined in the Functions and Operators library
such as fn:filter
, fn:foreach
and fn:foldleft
.

Class Summary Class Description AtomicConstructorFunction A function item representing a constructor function for an atomic typeCallableWithBoundFocus 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.CoercedFunction 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.CurriedFunction A function obtained by currying another function, that is, the result of calling fn:partialapplyFilterFn This class implements the function fn:filter(), which is a standard function in XQuery 3.0FoldLeftFn This class implements the function fn:foldleft(), which is a standard function in XPath 3.0FoldRightFn This class implements the function fn:foldright(), which is a standard function in XQuery 1.1ForEachFn This class implements the function fn:foreach() (formerly fn:map), which is a standard function in XQuery 3.0ForEachPairFn This class implements the function fn:foreachpair() (formerly fn:mappairs()), which is a standard function in XQuery 3.0FunctionArity This class implements the function functionarity(), which is a standard function in XPath 3.0FunctionLiteral A FunctionLiteral is a wrapper around a FunctionItem; it is an expression, whose value is the function that it wraps.FunctionLookup This class supports the functionlookup() function in XPath 3.0.FunctionLookup.FunctionLookupExportAgent FunctionName This class implements the function functionname(), which is a standard function in XPath 3.0FunctionSequenceCoercer An 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.FunctionSequenceCoercer.Coercer LoadXqueryModule This class implements the function loadxquerymodule(), which is a standard function in XPath 3.1.PartialApply This expression class implements the operation of currying (or performing partial application) of a function.RandomNumberGenerator This class implements the function randomnumbergenerator(), which is a standard function in XPath 3.1Sort_3 This class implements the function fn:sort#2, which is a higherorder function in XPath 3.1 available only in SaxonPE and aboveSystemFunctionWithBoundContextItem 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.UnresolvedXQueryFunctionItem UserFunctionReference A UserFunctionReference is an expression in the form local:f#1 where local:f is a userdefined function.UserFunctionReference.BoundUserFunction A BoundUserFunction represents a userdefined function seen as a component.