Forum Discussion
A generalised Lambda helper function that return arrays of arrays using bisection.
I must be dense (or my brain may have been scrambled by trying to wrap itself around the concept of thunks for so long) but let ask a simple question. You say:
"it is intended to non-problem specific and hence reusable. ...the user provides a Lambda function that performs the required calculation as if BYROW would return the result.."
So let's say I have range of three one-column rows each containing a first and last name, comma separated ("Elvis,Presley", for example).
Trying
=BYROW(range,LAMBDA(row,TEXTSPLIT(row,",")))
results in your classic #CALC! and the admonition that "nested arrays are not supported".
What do I need to modify in your attached workbook so as to get the desired output (a 2X3 array)?
As you mention, this is not a specific request for help. In an ideal world (short of Excel resolving the array-of-arrays issue natively), I would have a black box into which I would feed the relevant array, the attack approach (by row, by column), the function to apply (TEXTSPLIT(), in this example) and the argument(s) required by that specific function (a delimiter, in this example) - and have the box spit out the correct outcome; something like:
=blackbox(range,byrow,textsplit,",")
One can only hope, right?
I think this does it! I have removed the array of thunks from name manager and passed it as a parameter.
I have added an example that arose in a LinkedIn discussion from Marco Filocamo
as well as your example that called for a similar text split.
The 'major' change for the user is to append the Greek letter λ to BYROW so that the formula picks up my function rather than the in-built helper function.