Add iterate helper

Add iterate helper as discussed in Issue #45. Tests are included