
2 Jun
2008
2 Jun
'08
10:41 p.m.
Hi
case insertLookupWithKey (\_ -> Set.union) k (Set.singleton v) chart of (Nothing, chart) -> Just chart (Just set, chart) | Set.member v set -> Nothing | otherwise -> Just chart
but notice that the set is still traversed twice.
Yes, I missed that bit. I don't see any way of reducing that, other than using an unsafePerformIO and IORef to track the combining function - which is probably a really bad idea. Thanks Neil