guppylang icon indicating copy to clipboard operation
guppylang copied to clipboard

Improve iterator protocol

Open mark-koch opened this issue 1 year ago • 0 comments

It would be better to only have a single function __next__: Iter -> Sum((Elem, Iter), ()), compared to the current protocol with __hasnext__, __next__, and __iterend__.

But this requires a notion of sum types first (see #95)

mark-koch avatar Jan 12 '24 14:01 mark-koch