lazyFunction = factory => {
	const fac = memoize(factory);
	const f = /** @type {unknown} */ (
		/**
		 * @param {...EXPECTED_ANY} args args
		 * @returns {T} result
		 */
		(...args) => fac()(...args)
	);
	return /** @type {T} */ (f);
}
@template {EXPECTED_FUNCTION} T
@param {() => T} factory factory function
@returns {T} function