Memoization in XQuery

Author: Dave Cassel  |  Category: Software Development

Memoization is tracking partial solutions so that they don’t have to be recalculated. A good example of where this is handy is the Fibonacci sequence. You may remember that the definition of this is: F(n) = F(n -1) + F(n – 2) F(1) = 1 F(2) = 1 Clearly, this is a recursive function. Let’s take a […]