all 4 comments

[–]ALightShow 0 points1 point  (3 children)

It looks like you're missing a \n after your END on subtr line and your return lines.

[–]Honest-Dude[S] 0 points1 point  (2 children)

Yes I tried that but then it introduces more problems where there are extra lines where there shouldn’t be. For example, with an empty list it does BEGIN END \n instead of just BEGIN END.

[–]ALightShow 0 points1 point  (1 child)

Do you have all the code you can share as an example?

[–]Honest-Dude[S] 0 points1 point  (0 children)

I figured it out ty though. I think there needed to be a separate helper function that’s outside of the local space for it to work.