Implement a foreach loop construct. Closes #17.