Add Data.List.NonEmpty.deleteAt
jamesdbrock opened this issue · 4 comments
jamesdbrock commented
https://pursuit.purescript.org/packages/purescript-lists/5.4.1/docs/Data.List.NonEmpty
Data.List.NonEmpty.deleteAt function doesn't exist, but
do exist. Seems like we should add Data.List.NonEmpty.deleteAt ?
jamesdbrock commented
deleteAt :: forall a. Int -> NonEmptyList a -> Maybe (List a)
jamesdbrock commented
deleteAt :: forall a. Int -> NonEmptyList a -> Maybe (List a)
deleteAt i (NonEmptyList (x :| xs))
| i == 0 = Just xs
| otherwise = L.Cons x <$> L.deleteAt (i - 1) xsjamesdbrock commented
Also alterAt?
garyb commented
Adding these sounds good to me!