Forum Discussion
xThomasM
Jan 13, 2021Copper Contributor
Lambda Functions - Limit of Iterations
Greetings, I'm experimenting with the powerful Lambda Functions on Excel and stumbled into something I'm not quite understanding. Is there a limit of iterations to recursive lambda functions? How is...
- Jan 21, 2021
There are some answers on
Lambda Example: Generate Fibonacci series - Microsoft Tech Community
which in turn references
https://www.sumproduct.com/news/article/lambda-formulaic-recursion-its-all-about-me
Basically it is to do with the limit of 1024 arguments on the stack. Since each recursion generates a new set of arguments, this builds rapidly.
The basic calculation is
= QUOTIENT( 1024, N)
I think nesting the recursive Lambdas provides the product of the recursions available from each level but the number of arguments is the sum of those at the two levels.
My practice of using LET to break the calculation into understandable steps may well be counterproductive in terms of adding to the argument count.
tboulden
Mar 10, 2021Iron Contributor
Link to my latest thread on this topic: https://techcommunity.microsoft.com/t5/excel/lambda-recursive-lists-and-understanding-recursion-limits-of/m-p/2199690