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 _______________________________________________ Haskell-Cafe mailing list [email protected] http://www.haskell.org/mailman/listinfo/haskell-cafe
