del' :: (Num a, DIM n) => SparseVector n a -> Index -> Maybe (SparseVector n a)
del' v i = case M.size v' of
                  0 -> Nothing
                  otherwise -> Just (SV v')
  where
    v' = M.delete i $ vec (checkDim i v)
del' :: (Num a, DIM n) => SparseVector n a -> Index -> Maybe (SparseVector n a)
del' v i = case M.size v' of
                  0 -> Nothing
                  otherwise -> Just (SV v')
  where
    v' = M.delete i $ vec (checkDim i v)
del' v i = case M.size v' of
                  0 -> Nothing
                  otherwise -> Just (SV v')
  where
    v' = M.delete i $ vec (checkDim i v)