src/vs/editor/common/core/wordCharacterClassifier.ts/once
function once<R>(computeFn: (input: string) => R): (input: string) => R {
	const cache: { [key: string]: R } = {}; // TODO@Alex unbounded cache
	return (input: string): R => {
		if (!cache.hasOwnProperty(input)) {
			cache[input] = computeFn(input);
		}
		return cache[input];
	};
}