
2 Nov
2009
2 Nov
'09
1:14 p.m.
Also +1. On a related note, I think it's unfortunate that those functions are partial. Like List.minimum and maximum, I always wind up wrapping them in a function that provides a default value. I suppose that would be a different proposal though... but maybe if we're breaking compatibility anyway it would be a good time to, say, change them to 'IntMap k a -> (k, a) -> (k, a)'? Actually, it seems that often 'IntMap k a -> b -> ((k, a) -> b) -> b' is more convenient, e.g. 'findMax fm Nothing Just', and you can always get the default val version back with 'id'.