'use strict';
if (typeof CeL === 'function')
	CeL.run({
		// name/id.
		name : 'extension.loop1',
		// dependency.
		require : 'extension.loop2.loop2_function',
		// post action.
		finish : function(name_space) {
			// assert: this.id===name_space.Class
			this.base.log('Module [' + name_space.Class + '] loaded.');
		},
		// source code.
		code : function(library_namespace) {
			// requiring
			var loop2_function = this.r('loop2_function');

			function loop1_function(caller) {
				library_namespace
						.debug(
								'This is extension.loop1.loop1_function'
										+ (caller ? ', called by ' + caller
												: '') + '.', 1,
								'loop1_function');
			}
			;

			function loop1_function2(caller) {
				library_namespace.debug('Calling loop2_function..', 1,
						'loop1_function2');
				loop2_function(caller || 'loop1_function2');
			}
			;

			return [ loop1_function, loop1_function2 ];
		}
	});
