> How about this? I think I got all my mistakes.
Compile it
Run it
Provide some test data
Observe test results

Then with the reference implementation using while and for
Compile it
Run it...