elm-community / array-extra

convenience functions for working with Array

Home Page:http://package.elm-lang.org/packages/elm-community/array-extra/latest

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

renaming suggestions

lue-bird opened this issue Β· comments

commented

To improve consistency

  • sliceUntil β†’ take
    • πŸ‘ like List.drop for natural indexes
    • πŸ‘Ž unlike List.drop for negative indexes
  • sliceFrom β†’ drop
    • πŸ‘ like List.take for natural indexes
    • πŸ‘Ž unlike List.take for negative indexes
  • update β†’ updateAt
    • πŸ‘ like Array.Extra.removeAt, Array.Extra.insertAt, Array.Extra.splitAt
    • πŸ‘Ž unlike Array.get, Array.set
commented

Hmm... seems not worth a breaking change.
Maybe if default behavior on negative indexes for sliceFrom/sliceUntil changes
from counting from the back to behavior of all other operations including splitAt, defaulting to empty or all.
Should we open a new issue for this?