4 ms·
> I’m disturbed that he needed a for loop to compute 100*(1-0.9^10) I assumed that he just wanted a reason to include at least a _little_ elisp. (Though, even
by codesections 5y ago
> I’m disturbed that he needed a for loop to compute 100*(1-0.9^10)
I assumed that he just wanted a reason to include at least a _little_ elisp. (Though, even so, he could at least have run the calculation recursively; in Raku, I'd probably have written
(-> $_, $i { $i ?? &?BLOCK($_ × .9, $i-1) !! $_ })(100, 10)
if I wanted an alternative to `100 × (1 - .9¹⁰)`