Functions for Program Structure
Foreach
- Goes through the items of a list one by one, repeating the steps inside the foreach for each one
- Excellent way to examine or manipulate each item in a list
- Unlike the while command, no way to get out of the loop
- It uses the list that was given to it at the beginning of the command, not the one at the end of the loop, so if you change the lisp in the middle, it wont use it
Repeat
- Repeats the program statements inside x number of times
- Also has no way to get out of the loop