Hacker News new | past | comments | ask | show | jobs | submit login

I think that the problem here is actually in signaling a wrong interface.

If you in fact want to receive a iterable, then you should not signal that you expect a list.

The keyword yield is in fact a nice language integrated mechanism to create a iterable interface.

In languages that lacking this it resorts to using much more verbose mechanism.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: