//Ensure a function is called only oncefunction once(fn:Function): Function{let called = false;return function(){if(!called){called = true;fn.apply(this,arguments)}}}