So new to this and posted some code in another thread - its’ been pointed out to me functions would save some repeats in my coding and make them easier to read and correct.
But I’m missing a subtly - the let instruction within my function results in this error - yet the same instruction (commented out in the screenshot) seems to work just fine - what am I not grasping?


