Forum Discussion
tboulden
Feb 13, 2021Iron Contributor
Recursive Lambda: Unpacking LET function
RecentlyTwifoo posted the FIFO Inventory challenge, and PeterBartholomew1 ventured "shouldn't take lori_m more than a few minutes to write a recursive Python script to reduce any LET function back to...
rachel
Apr 06, 2024Steel Contributor
I need to use @ to convert array into a string to use textsplit in let, I not sure whether it is supported on your excel, but it works for me:
=TOCOL(
TEXTSPLIT(
ARRAYTOTEXT(
MAP(
A2:A4,
LAMBDA(x,
LET(
data, TEXTSPLIT(x, "|"),
xs, TEXTSPLIT(@TAKE(data, 1, 1), ","),
ys, TEXTSPLIT(@TAKE(data, 1, -1), ","),
ARRAYTOTEXT(TOROW(xs & "-" & TRANSPOSE(ys)), 0)
)
)
),
0
),
","
)
)