src/TypedArray.php
public function getIterator(): Traversable
	{
		if (is_a($this->_type, AtomicInterface::class, true)) {
			return (function &() {
				foreach ($this->_container as $k => $v) {
					$v     = $v->get();
					$vOrig = $v;
					yield $k => $v;
					if ($v !== $vOrig) {
						$this->_container[$k]->set($v);
					}
				}
			})();
		}
		else {
			return (function &() {
				foreach ($this->_container as $k => &$v) {
					yield $k => $v;

					//	Compare whole class names.
					if (get_class($v) !== $this->_type) {
						$this->offsetSet($k, $v);
					}
				}
			})();
		}
	}
public function getIterator(): Traversable
	{
		if (is_a($this->_type, AtomicInterface::class, true)) {
			return (function &() {
				foreach ($this->_container as $k => $v) {
					$v     = $v->get();
					$vOrig = $v;
					yield $k => $v;
					if ($v !== $vOrig) {
						$this->_container[$k]->set($v);
					}
				}
			})();
		}
		else {
			return (function &() {
				foreach ($this->_container as $k => &$v) {
					yield $k => $v;

					//	Compare whole class names.
					if (get_class($v) !== $this->_type) {
						$this->offsetSet($k, $v);
					}
				}
			})();
		}
	}
Required by the IteratorAggregate interface.
Every value is checked for change during iteration.

The _type or gettype() can return different names for the same type,
ie. "bool" or "boolean", so we're only going to check the first 3 characters.

@return Traversable