lib/extensions.js
function(arr, iterator) {
			if (typeof iterator !== 'function') return apiRejection('iterator must be a function');

			var self = this;
			var i = 0;
			return Promise.resolve().then(function iterate() {
				if (i == arr.length) return;

				return Promise.resolve(iterator.call(self, arr[i]))
				.then(function(result) {
					if (result !== undefined) return result;

					i++;
					return iterate();
				});
			});
		}
function(arr, iterator) {
			if (typeof iterator !== 'function') return apiRejection('iterator must be a function');

			var self = this;
			var i = 0;
			return Promise.resolve().then(function iterate() {
				if (i == arr.length) return;

				return Promise.resolve(iterator.call(self, arr[i]))
				.then(function(result) {
					if (result !== undefined) return result;

					i++;
					return iterate();
				});
			});
		}
function ( arr , iterator ) { if ( typeof iterator !== 'function' ) return apiRejection ( 'iterator must be a function' ) ; var self = this ; var i = 0 ; return Promise . resolve ( ) . then ( function iterate ( ) { if ( i == arr . length ) return ; return Promise . resolve ( iterator . call ( self , arr [ i ] ) ) . then ( function ( result ) { if ( result !== undefined ) return result ; i ++ ; return iterate ( ) ; } ) ; } ) ; }
run iterator on each item in array in series return first result from iterator that is not undefined
run iterator on each item in array in series return first result from iterator that is not undefined