
13 Dec
2012
13 Dec
'12
10:49 a.m.
Christian Maeder
Hi,
when trying out Data.IntMap.Strict instead of Data.IntMap, I've noticed (after some confusion) that Data.IntMap.Strict.findWithDefault evaluates the default value, even if it is not used!
I usually pass an error-call to IntMap.findWithDefault to get a more informative crash-message than by using IntMap.!
I have also found this to be problematic in the past. Is there a compelling reason to keep the current behavior? I would find this function far more useful if the default value were lazily evaluated. Cheers, - Ben