Course · Section 10: A Closer Look at Functions · Lecture 139: Functions Returning Functions
Implement `once(fn)` returning a function that invokes `fn` only on its first call and returns that first result on every later call.
+ 1 hidden test run on Submit.
A closure flag ensures fn runs only the first time; the stored result is returned thereafter.
Run your code to see results.