src/vs/editor/standalone/common/monarch/monarchCompile.ts/isArrayOf
function isArrayOf(elemType: (x: any) => boolean, obj: any): boolean {
	if (!obj) {
		return false;
	}
	if (!(Array.isArray(obj))) {
		return false;
	}
	for (const el of obj) {
		if (!(elemType(el))) {
			return false;
		}
	}
	return true;
}