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
reduce with an inappropriate function throws the wrong error #4189
Comments
The same happens with |
What's the expected error? |
@mlucy, the printf parameters are switched. Or the error is being thrown when the function is called rather than when it is created. |
The current error messages make sense to me. I don't think they are wrong. As an improvement, we could check the arity of functions before we call them, and then print something like "Expected a 2-argument function but found a 3-argument function in:..." |
My interpretation of the current error message is "This function expected 3 arguments but was passed 2." We should probably change the message to be clearer if it confused two people. |
This was fixed by @fantasticsid in PR #4644 (reviewed by me). |
The text was updated successfully, but these errors were encountered: