unionWith :: (Eq a, Num a, DIM n) => (a -> a -> a) -> SparseVector n a -> SparseVector n a -> SparseVector n a
unionWith f (SV x) (SV y) = SV $ M.filter (/= 0) (M.unionWith f x y)
unionWith :: (Eq a, Num a, DIM n) => (a -> a -> a) -> SparseVector n a -> SparseVector n a -> SparseVector n a
unionWith f (SV x) (SV y) = SV $ M.filter (/= 0) (M.unionWith f x y)
unionWith f (SV x) (SV y) = SV $ M.filter (/= 0) (M.unionWith f x y)