 		src.emit = (val) ->
 			for handler in src.handlers
 				Promise.resolve(val).then(
-					handler.resolver
-					handler.rejector
+					handler.onEmit
+					handler.onError
 				).then(
 					handler.nEmit
 					handler.nError


	###*
	 * Create a composable event source function.
	 * @return {Function} `((v) ->, (reason) ->) -> source` The fucntion's
	 * members:
	 * ```js
	 * {
	 * 	emit: function (v) {},
	 * 	error: function (reason) {},
	 * 	handlers: Array
	 * }

	 * var linear = utils.source();
	 *
	 * var x = 0;
	 * setInterval(() => {
	 * 	linear.emit(x++);
	 * }, 1000);
	 *
	 * // Wait for a moment then emit the value.
	 * var quad = linear(x => utils.sleep(2000, x * x));
	 *
	 * quad(
	 * 	value => { console.log(value); },
	 * 	reason => { console.error(reason); }
	 * );
	 *
	 * // Dispose all children.
	 * linear.handlers = [];
	 * ```
	 * @example
	 * ```js
	 * var filter = fn => v => fn(v) ? v : utils.end();
	 *
	 * var keyup = utils.source((emit) => {
	 * 	document.querySelector('input').onkeyup = emit;
	 * });
	 *
	 * var keyupText = keyup(e => e.target.value);
	 *
	 * // Now we only get the input when the text length is greater than 3.
	 * var keyupTextGT3 = keyupText(filter(text => text.length > 3));
	 *
	 * keyupTextGT3(v => console.log(v));
	 * ```
	###
	source: (executor) ->
		src = (onEmit, onError) ->
			nSrc = utils.source()
			src.handlers.push {
				onEmit
				onError
				nEmit: nSrc.emit
				nError: nSrc.error
			}
