The key step is given as a helper function named split.
1. Run the script, to be sure it works!
2. Move the helper function into the quick sort function.
3. Simplify the parameter list for split, making use of your
understanding of scope for internal functions.
• Hint: what parameters don’t change in split?
4. Leave a short comment in the split function explaining
your reasoning.
5. Make sure the script still works!
(You’ll hand in the code for this activity. See Slide 49)
CMPT 145 Lab 08: Stackframes, Scope, and Internal Functions 46/49