You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
expensive_function(k) = (println(k); k > 2 && error("too large!"))
b = OrderedDict(k => expensive_function(k) for k in 1:3)
prints
1
2
3
1
2
3
ERROR: too large!
(stack trace omitted)
The constructor shouldn't call my expensive_function again on previous elements.
This seems also to affect some (all?) other structures in DataStructures.jl.
The text was updated successfully, but these errors were encountered:
For example, this:
prints
(stack trace omitted)
The constructor shouldn't call my
expensive_function
again on previous elements.This seems also to affect some (all?) other structures in
DataStructures.jl
.The text was updated successfully, but these errors were encountered: