New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Self-recursion hack #1928
Self-recursion hack #1928
Conversation
Current coverage is 87.35%@@ master #1928 diff @@
==========================================
Files 295 298 +3
Lines 52650 52856 +206
Methods 0 0
Messages 0 0
Branches 5433 5456 +23
==========================================
+ Hits 46076 46171 +95
- Misses 5663 5764 +101
- Partials 911 921 +10
|
Awesome! Is this a step on the way to full higher order functions? |
Not really. This sidesteps the need for changes to our type inference algorithm by pre-registering the signature of the recursive function (which is why we require an explicit type signature for recursion support). Higher order functions are a very different problem. :) |
Makes sense. Are there any plans to pursue higher order functions? |
It's not a high priority at this point. We have a lot more basic issues to solve first. |
This PR revives the approach in PR #719. Self-recursion is supported, only with an explicit signature, and with the same signature in the recursive call(s).