I think it's easier (and better) rewritten in functional style with a generator function returning the ETA closure function.
Most of your states would be my-vars in the outer generators scope. And you wouldn't need the voodoo to initialize the first run.
This state $init = do {... } is an interesting trick tho. :)
Cheers Rolf
(addicted to the Perl Programming Language :)
see Wikisyntax for the Monastery
In reply to Re: Acceleration ETA algorithm
by LanX
in thread Acceleration ETA algorithm
by phizel
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |