function ifthen( bool, x, y ) {
	if ( !isFunction( x ) ) {
		throw new TypeError( format( 'invalid argument. Second argument must be a function. Value: `%s`.', x ) );
	}
	if ( !isFunction( y ) ) {
		throw new TypeError( format( 'invalid argument. Third argument must be a function. Value: `%s`.', y ) );
	}
	if ( bool ) {
		return x();
	}
	return y();
}
If a condition is truthy, invokes `x`; otherwise, invokes `y`.

@param {boolean} bool - condition
@param {Function} x - function to invoke if a condition is truthy
@param {Function} y - function to invoke if a condition is falsy
@throws {TypeError} second argument must be a function
@throws {TypeError} third argument must be a function
@returns {*} return value of either `x` or `y`

@example
var randu = require( '@stdlib/random/base/randu' );

function x() {
    return randu() * 100.0;
}

function y() {
    return -1.0 * randu() * 100.0;
}

var z = ifthen( randu() > 0.5, x, y );
// returns <number>