future.js
function(arg1, arg2) {
		if (this.resolved) {
			if (arg2) {
				if (this.error) {
					arg1.throw(this.error);
				} else {
					arg2(this.value);
				}
			} else {
				arg1(this.error, this.value);
			}
		} else {
			(this.callbacks = this.callbacks || []).push([arg1, arg2]);
		}
		return this;
	}
function(arg1, arg2) {
		if (this.resolved) {
			if (arg2) {
				if (this.error) {
					arg1.throw(this.error);
				} else {
					arg2(this.value);
				}
			} else {
				arg1(this.error, this.value);
			}
		} else {
			(this.callbacks = this.callbacks || []).push([arg1, arg2]);
		}
		return this;
	}
function ( arg1 , arg2 ) { if ( this . resolved ) { if ( arg2 ) { if ( this . error ) { arg1 . throw ( this . error ) ; } else { arg2 ( this . value ) ; } } else { arg1 ( this . error , this . value ) ; } } else { ( this . callbacks = this . callbacks || [ ] ) . push ( [ arg1 , arg2 ] ) ; } return this ; }
Waits for this future to resolve and then invokes a callback.

If two arguments are passed, the first argument is a future which will be thrown to in the case
of error, and the second is a function(val){} callback.

If only one argument is passed it is a standard function(err, val){} callback.
Waits for this future to resolve and then invokes a callback .