makeSaver=fn=>{ var x = fn(); return _=> x; }; var saver = makeSaver(Math.random); var value1 = saver(); var value2 = saver(); alert(value1 === value2);