Forum Discussion
ecovonrein
Jun 30, 2022Iron Contributor
HRECURSE instead of MAKEARRAY, recursing LAMBDA
I wish to share with the community some seriously goofy but generic LAMBDA code I created yesterday. By way of introduction, once you go down the route of SPILLed inputs, you very quickly arrive ...
ecovonrein
Aug 22, 2023Iron Contributor
I am surprised that you can use MAKEARRAY to compute your columns. It means that every row performs the same calculation. Which strikes me as odd (before the mental picture of the original challenge which motivated HRECURSE.)
Anyway, glad to hear you got it done and our discussion proved useful to you.
Anyway, glad to hear you got it done and our discussion proved useful to you.
Henrik_Jeppsson
Dec 19, 2023Copper Contributor
You can recurse without using name manager:
=LET( Y,LAMBDA(G,X,IF(X>1,X*G(G,X-1),1)), F,LAMBDA(X,Y(Y,X)), F(5) )
Above is example with recursive factorial calculation.
Comes from lambda calculus and is called the theta combinator.
credit to hoover889 on reddit.