 		###
 		reduce: ( promisesOrValues, reduceFunction, initialValue ) ->
 			# Wrap the reduce function with one that handles promises and then delegates to it.
+			whenResolved = @when
 			reduceArguments = [
 				( previousValueOrPromise, currentValueOrPromise, currentIndex ) ->
-					return @when( previousValueOrPromise, ( previousValue ) ->
-						return @when( currentValueOrPromise, ( currentValue ) ->
+					return whenResolved( previousValueOrPromise, ( previousValue ) ->
+						return whenResolved( currentValueOrPromise, ( currentValue ) ->
 							return reduceFunction( previousValue, currentValue, currentIndex, promisesOrValues )
 						)
 					)

		###
		map: ( promisesOrValues, mapFunction ) ->
			# Since the map function may be asynchronous, get all invocations of it into flight ASAP.
			results = new Array[ promisesOrValues.length ]
			for index, promiseOrValue in promisesOrValues
				if index of promisesOrValues
					results[ index ] = @when( promiseOrValue, mapFunction )

			if promiseOrValue instanceof Ext.ClassManager.get( 'Deft.util.Promise' ) or promiseOrValue instanceof Ext.ClassManager.get( 'Deft.util.Deferred' )
				return promiseOrValue.then( callbacks )
			else
				deferred = Ext.create( 'Deft.util.Deferred' )
				deferred.resolve( promiseOrValue )
				return deferred.then( callbacks )
		
		###*
		Returns a new {@link Deft.util.Promise} that will only resolve once all the specified `promisesOrValues` have resolved.
		The resolution value will be an Array containing the resolution value of each of the `promisesOrValues`.
		###
		all: ( promisesOrValues, callbacks ) ->
			results = new Array( promisesOrValues.length )
			promise = @reduce( promisesOrValues, @reduceIntoArray, results )
			
			return @when( promise, callbacks )
