1

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.

1
  • Not sure if it helps, but check out this older post which I'm sure can now also be tidied up since the introduction of REDUCE(). Commented Oct 31, 2021 at 7:40

1 Answer 1

2

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.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.