`iterate` functionality

No tests yet, please review the implementation