-
Notifications
You must be signed in to change notification settings - Fork 382
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
Factorial function seems to not work #39
Comments
Thanks for reporting this. Why are you trying to subtract |
oh my bad. It should be -1. Instead of result, but I still feel weird why I can't reference that whilst it's being referenced next to it. Anyway you can close it then, not really an issue. |
No problem. I agree with you that it is weird and I am curious about the difference in the code. Could you send a link to the line in the code? You can do so by opening the file on GitHub and then clicking on the line number. Then you can copy the link from your address bar :) |
def factorial(n: Int): Int = factorial(3) shouldBe 6 this is not working as is coming back with error ERROR -> not found: value n at [224, 224, 224] I run the code in my IDE and is working buty in your test n is not recognised. |
this answer should also be accepted |
Error related to dependency was shown whatever I put in the answer box in this Function Loops tutorial page.
|
I can't refer the variable result that's definitely in scope for the function for some reason.
Also, Looking at the source code, the code is actually different than the one shown here.
The text was updated successfully, but these errors were encountered: