-
Notifications
You must be signed in to change notification settings - Fork 12
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
Don't rely on reduce being fold-left #3
Comments
This is so clearly not relevant to any of this code :) I think I used to have it written something like that at one point during its evolution, but the higher-order-function approach was appealing for reasons that are completely impractical, but that fits well with the context. But in light of JuliaLang/julia#4046 I agree that it'll need to be changed. I'll roll it in when I update all my packages around 0.2-rc1 time. |
Closing since it's old |
The bug in |
don't rely on reduce being fold-left (fix #3)
As you mentioned today, the code
assumes that the associativity of
reduce
is fold-left, which is true of the current implementation but is undocumented, and may change (JuliaLang/julia#4046).In any case,
has the additional virtue of being faster (since it avoids the call to
reverse
and the allocation of a new array), not that it probably matters to you.The text was updated successfully, but these errors were encountered: