Category Archives: Higher Order Functions

Recursion with anonymous (inline) functions in XPath 3.0 — Part II

In my first post about implementing recursion with anonymous functions I provided the following example: let $f := function($n as xs:integer, $f1 as function(xs:integer, function()) as xs:integer ) as xs:integer {if($n eq 0) then 1 else $n * $f1($n -1, … Continue reading

Posted in Higher Order Functions, Performance Optimization, XPath 3.0 | 7 Comments

Recursion with anonymous (inline) functions in XPath 3.0

A few days ago Roger Costello asked at the xsl-list forum: Hi Folks Is it possible to do recursion in an anonymous function? Example: I would like to implement an “until” function. It has three arguments: 1. p is a … Continue reading

Posted in Higher Order Functions, XPath 3.0 | Tagged , , | 6 Comments