function once(func) { let used = false let ans = null return function() { if(used) return ans used = true ans = func() return ans } }