There’s some inconsistency among the return types of these functions. Some return a
Maybe while others don’t.
-- returns Maybe -- Data.Array updateAt :: forall a. Int -> a -> Array a -> Maybe (Array a) -- Data.List updateAt :: forall a. Int -> a -> List a -> Maybe (List a) -- returns original -- Data.Array updateAtIndices :: forall t a. Foldable t => t (Tuple Int a) -> Array a -> Array a -- Data.List.Lazy updateAt :: forall a. Int -> a -> List a -> List a
Should we make these more consistent, even if that involves a breaking API change and a tedious update of many packages?
Originally asked about this here, where a wider discussion was suggested.