3 ms·
According to the article, you need to write interfaces that accept a function and call it somewhere down the line. At this point you already cannot guarantee th
by Grue3 10y ago
According to the article, you need to write interfaces that accept a function and call it somewhere down the line. At this point you already cannot guarantee the lack of recursion, simply because the supplied function can call your function again. It is simply not possible to write a code that always halts, unless you never even call the supplied function.
- Retra 10y agoThere's a difference between general recursion and bounded recursion, and you can very easily constrain recursive functions to terminate, especially if you're in control of the data they must pass around.