Reputation: 2877
I am writing a SPLIT function using the new lambda function to recursively pull items out of a text string, based on a delimiter.
The problem is that I need to keep a variable length list in memory of these items as I find them, ie a list that grows in length as I add items.
Upvotes: 1
Views: 658
Reputation: 2877
I couldn't find a solution online, but eventually stumbled on this simple approach. This creates a new list by adding a new item B to the end of an existing list A
IF(SEQUENCE(1,COUNTA(A)+1)<COUNTA(A)+1, A, B)
I thought this might be useful for anyone doing recursive lambdas.
Upvotes: 2