Skip to content
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

Error in multiplicationDirectiveTile #16

Open
jbouffard opened this issue Aug 28, 2017 · 0 comments
Open

Error in multiplicationDirectiveTile #16

jbouffard opened this issue Aug 28, 2017 · 0 comments

Comments

@jbouffard
Copy link

There is a chance for multiplicationDirectiveTile to fail in certain cases due to this line:

val scalarSum: Double = dbls.reduce(_ * _) + ints.reduce(_ * _)

The reason why this would be fail is that it is not possible to reduce an empty collection in Scala, so if either dbls or ints is empty then the method will fail.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant