improved details and corner cases of some documentation, and added examples for repeat and iterate