function iterLast( iterator ) {
	var last;
	var v;
	if ( !isIteratorLike( iterator ) ) {
		throw new TypeError( format( 'invalid argument. Must provide an iterator. Value: `%s`.', iterator ) );
	}
	while ( true ) {
		v = iterator.next();
		if ( v.done ) {
			return last;
		}
		last = v.value;
	}
}
Consumes an iterator and returns the last iterated value.

@param {Iterator} iterator - input iterator
@throws {TypeError} must provide an iterator
@returns {*} last iterated value

@example
var array2iterator = require( '@stdlib/array/to-iterator' );

var it = array2iterator( [ 0, 0, 0, 0, 1 ] );

var v = iterLast( it );
// returns 1