Forum Discussion
Ways of performing Accumulation with Dynamic Arrays
- Jul 26, 2021
This has been a great thread! Thanks to all the contributors. We just announced a new wave of lambda functions that I think will greatly help these scenarios. In particular, REDUCE, SCAN, BYROW and BYCOL.
Very nice, PeterBartholomew1! I went down a rabbit hole trying to use thunks and trampolining to get over the stack depth issue with recursion, but with little success. I think I may be misunderstanding something essential, however the examples all used a WHILE loop to prevent running out of stack and trying to replicate that with LAMBDA is self-defeating. This is an interesting approach with traversing a binary tree, will look at it in more depth.
On a related note: https://www.youtube.com/watch?v=7tFq-9Zvk3M Check 54:19 for Andy Gordon's fold implementation. Also, he mentions LAMBDA editor should be getting released to a small group early, and he invites folks to reach out if interested.
Sorry, I appear to have missed some of your posts.
LAMBDA: Recursive Lists and Understanding Recursion Limits of LAMBDA - Microsoft Tech Community
You have been busy! I still find the functional calculus notation pretty opaque. Even where I think I understand the concept, expressing it in the lambda notation and manipulating the formula does not come naturally.
The idea of the binary tree evolved during the work. At first my idea was simply to accumulate over single years and then nest the annual result to apply the formula to multiple years. I then decided that it is not necessary to identify such natural grouping within the dataset and instead to simply bisect the it to the required depth. Only then did I realise I do not need to actually split the array but, rather, I could merely pass a pointer and array length to the internal Lambda function. The result was the binary tree but that wasn't in mind at the outset!
Thanks for the link to Andy Gordon's talk. I had not seen some of the later material before and noted his invitation to make contact, but no contact details were provided. Do you have an email address for Andy to request access to the Lambda editor? I sent an email to the seminar organisers to forward so we will see what comes of that.
- tbouldenMay 08, 2021Iron ContributorIn addition Sergei's LinkedIn link, I used the microsoft.com address found here: https://www.microsoft.com/en-us/research/people/adg/.
- PeterBartholomew1May 08, 2021Silver Contributor
Thanks for the leads. I will give it a bit before following up to avoid the risk of duplication.
- SergeiBaklanMay 08, 2021Diamond Contributor