forEachRuntime = (runtime, fn, deterministicOrder = false) => {
	if (runtime === undefined) {
		fn(undefined);
	} else if (typeof runtime === "string") {
		fn(runtime);
	} else {
		if (deterministicOrder) runtime.sort();
		for (const r of runtime) {
			fn(r);
		}
	}
}
@param {RuntimeSpec} runtime runtime
@param {(runtime: string | undefined) => void} fn functor
@param {boolean} deterministicOrder enforce a deterministic order
@returns {void}