This pull request changes how Iterator(T) yields its next value. It used to return a (T, bool), where it was understood that returning false would result in termination of the iteration and that the T value given should be ignored. This had needlessly complicated semantics and can be easily replaced with ? T as the return type, since ? T encodes the presence or absence of a value.
This pull request changes how
Iterator(T)
yields its next value. It used to return a(T, bool)
, where it was understood that returningfalse
would result in termination of the iteration and that theT
value given should be ignored. This had needlessly complicated semantics and can be easily replaced with? T
as the return type, since? T
encodes the presence or absence of a value.