LeetCodeAllow One Function CallAllow One Function CallEasySolution export function once<T, R>(fn: (...args: T[]) => R): (...args: T[]) => R | undefined { let called = false; return (...args) => { if (called) { return; } called = true; return fn(...args); }; }LeetCodeAllow One Function Callhttps://leetcode.com/problems/allow-one-function-call