compileBoundsSearch = (predicate, reversed, suffix, earlyOut) => {
	const arg1 = compileSearch("A", `x${predicate}y`, reversed, ["y"], earlyOut);

	const arg2 = compileSearch(
		"P",
		`c(x,y)${predicate}0`,
		reversed,
		["y", "c"],
		earlyOut
	);

	const fnHeader = "function dispatchBinarySearch";

	const fnBody =
		// eslint-disable-next-line no-multi-str
		"(a,y,c,l,h){\
if(typeof(c)==='function'){\
return P(a,(l===void 0)?0:l|0,(h===void 0)?a.length-1:h|0,y,c)\
}else{\
return A(a,(c===void 0)?0:c|0,(l===void 0)?a.length-1:l|0,y)\
}}\
return dispatchBinarySearch";

	const fnArgList = [arg1, arg2, fnHeader, suffix, fnBody, suffix];
	const fnSource = fnArgList.join("");
	// eslint-disable-next-line no-new-func
	const result = new Function(fnSource);
	return result();
}
This helper functions generate code for two binary search functions:
A(): Performs a binary search on an array using the comparison operator specified.
P(): Performs a binary search on an array using a _custom comparison function_
`c(x,y)` **and** comparison operator specified by `predicate`.
@template T
@param {BinarySearchPredicate} predicate The predicate / comparison operator to be used in the binary search.
@param {boolean} reversed Whether the search should be reversed.
@param {SearchPredicateSuffix} suffix The suffix to be used in the function name.
@param {boolean=} earlyOut Whether the search should return as soon as a match is found.
@returns {(items: T[], start: number, compareFn?: number | ((item: T, needle: number) => number), l?: number, h?: number) => number} The compiled binary search function.