Forum Discussion
A generalised Lambda helper function that return arrays of arrays using bisection.
I may well be running round in circles but I have learnt a lot from implementing the binary tree. The feature that a really want to hold on to is that the syntax of the final formula (as well as the Lambda function) should match the in-built BYROW precisely. I do have some concerns about computational efficiency though.
I have written a BYCOL version that works will minimal modifications (basically changing ROWS(
I may well be running round in circles
I can only imagine what you brain must feel like in your skull...
I have written a BYCOL version that works will minimal modifications
Can you please share that too?
I would argue that if you successfully covered BYROW and BYCOL, you have covered 70%-80% of the array-of-arrays cases (at least in my limited experience) and made a major contribution to our mental health and welfare.
- PeterBartholomew1Feb 05, 2024Silver Contributor
Is the workbook unstable on your computer? I think I will separate the SCAN, with the thunks used to handle the 2 column array used to collect the Fibonacci series, to another workbook since that is where the trouble started.
I have just submitted 'My Feedback' to Microsoft. It is not a system I am familiar with, so we will see what happens!
- TheDubFeb 05, 2024Iron Contributor
Not sure what exactly you mean by "unstable", but I'm having enough occasional hiccups to require me to exit Excel and restart. Very frustrating..
- PeterBartholomew1Feb 06, 2024Silver Contributor
I have completed the alternative approach to the problem of expanding a column of thunks to give a 2D array. As before, the task of generating the column of thunks uses a BYROW wrapper that first reduces the column of row arrays to a column of thunks and then uses a binary tree to expand and stack the results.
I do have concerns relating to the possible efficiency of the process but first one needs to obtain answers and only then does efficiency become relevant!
- PeterBartholomew1Jan 30, 2024Silver Contributor
Sadly, I seem to have messed up the workbook. BYROWλ and BYCOLλ both seemed to be working well but then I started to work on SCANλ and suddenly the workbook started to fall apart. #VALUE! errors show which disappear if one is persistent and re-enter the formula. Only then another formula will suddenly error.
As far as SCANλ is concerned, it was to act as a wrapper for SCAN, but dethunk the accumulation parameter before using it and changing the user-provided Lambda function to apply THUNK to each result. It all seemed so straightforward ...