Simpler for..of iterator and safer type check
Compile for repo