It will make debugging process easier in case I want to use additional array (not just a passed as the func argument) or don't want to use keyboard / file input
See, I'm not really convinced.
So far, I only saw one use of a nontrivial constant array in accepted solutions.
And it could have easily been replaced by a few lines of pseudorandom number generation.
Something like
mem := [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
would be sooo much easier thanIt will make debugging process easier in case I want to use additional array (not just
a
passed as the func argument) or don't want to use keyboard / file input