Update replace-for-with-foreach.md

Added basic example and references.