function repl( options, clbk ) {
	var server;
	var opts;
	var err;
	var cb;

	opts = defaults();
	if ( arguments.length === 1 ) {
		cb = options;
	} else {
		err = validate( opts, options );
		if ( err ) {
			throw err;
		}
		cb = clbk;
	}
	if ( !isFunction( cb ) ) {
		throw new TypeError( format( 'invalid argument. Callback argument must be a function. Value: `%s`.', cb ) );
	}
	// Start the REPL server:
	server = r.start( opts );

	// Extend a REPL context:
	extendContext( server );

	// Don't release the zalgo!
	setTimeout( onTimeout, 0 );

	/**
	* Callback invoked during a subsequent tick.
	*
	* @private
	*/
	function onTimeout() {
		cb( null, server );
	}
}
Starts a REPL environment.

@param {Options} [options] - REPL options
@param {Callback} clbk - callback to invoke upon starting a REPL
@throws {TypeError} options argument must be an object
@throws {TypeError} must provide valid options
@throws {TypeError} callback argument must be a function

@example
repl( onStart );

function onStart( error, server ) {
    if ( error ) {
        throw error;
    }
    server.close();
}