for impl recursion, we need: func = fn(func: Function) { poll(); set_timeout(func, timeout, func); } set_timeout(func, timeout, func)