3 ms·
cute: when the function is run, it calculates the value to be cached, then redefines the function to just return that value. This way, you don't need to check i
by 13ren 18y ago
cute: when the function is run, it calculates the value to be cached, then redefines the function to just return that value. This way, you don't need to check if the value has been calculated yet or not.
Yay for self-modifying code.