-- Accumulations
-- -------------

-- | /O(m+n)/ For each pair @(i,c)@ from the list, replace the vector element
-- @a@ at position @i@ by @f a c@.
--
-- > accum (+) <5,9,2> [(2,4),(1,6),(0,3),(1,7)] = <5+3, 9+6+7, 2+4>
accum :: G.Vector (Vector k) (Rec (TaggedFunctor Identity) rs)
      => (Rec (TaggedFunctor Identity) rs -> c -> Rec (TaggedFunctor Identity) rs) -- ^ accumulating function @f@
      -> (Vector k) (Rec (TaggedFunctor Identity) rs)       -- ^ initial vector (of length @m@)
      -> [(Int,c)]               -- ^ list of index/value pairs (of length @n@)
      -> (Vector k) (Rec (TaggedFunctor Identity) rs)
accum = G.accum
accum :: G.Vector (Vector k) (Rec (TaggedFunctor Identity) rs)
      => (Rec (TaggedFunctor Identity) rs -> c -> Rec (TaggedFunctor Identity) rs) -- ^ accumulating function @f@
      -> (Vector k) (Rec (TaggedFunctor Identity) rs)       -- ^ initial vector (of length @m@)
      -> [(Int,c)]               -- ^ list of index/value pairs (of length @n@)
      -> (Vector k) (Rec (TaggedFunctor Identity) rs)
accum = G.accum
accum = G.accum