Prevent Google App Script Memoization -


i have function want use demonstrate flipping coin 100 times:

function simulateflips(n, pheads){    var head_count = 0;     var h;     for(var i=0; < n; i++){       h = 0;        if (math.random() < pheads){         h = 1;       }     head_count += h;     }    return head_count;   } 

however, looks standard google app behavior "memoize" custom functions called same inputs, not want kind of demo:

screenshot google spreadsheet know hacky (like modify pheads small amount), hoping there cleaner way desired behavior.

here's explanation of behavior: script summarise data not updating

read comments see suggestions on how workaround it.


Comments

Popular posts from this blog

PHPMotion implementation - URL based videos (Hosted on separate location) -

javascript - Using Windows Media Player as video fallback for video tag -

c# - Unity IoC Lifetime per HttpRequest for UserStore -