next = () => {
		/** @type {boolean|undefined} */
		let loop;
		iterator(
			array[i++],
			(err, result) => {
				if (err || result !== undefined || i >= array.length) {
					return callback(err, result, i);
				}
				if (loop === false) while (next());
				loop = true;
			},
			i,
		);
		if (!loop) loop = false;
		return loop;
	}
@template T
@template Z
@param {T[]} array array
@param {Iterator<T, Z>} iterator iterator
@param {(err?: null|Error, result?: null|Z, i?: number) => void} callback callback after all items are iterated
@returns {void}