Fix "for...of" loop on `Result<T>` objects
Trying to iterate over a Result<T> object (e.g. one returned by calling find) using a "for...of" loop results in the following TypeScript error:
TS2488: Type Result<T> must have a [Symbol.iterator]() method that returns an iterator.
But, Result<T> explicitly implements [Symbol.iterator], so ignoring this type error fixes the "for...of" iteration.
This PR changes Result<T> from being an Iterator to being an IterableIterator (which means that it implements [Symbol.iterator]() in addition to being an Iterator).
This PR originally added the method [Symbol.iterator] to the type definition of Result<T>.
The correct solution is to treat Result<T> as an IterableIterator.
These fixes will be handled as part of the conversion to TypeScript. Thank you for this PR and bringing this to our attention!