Use range as an iterator (Fixes #6)