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:
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
Post a Comment