elm-community / list-extra

Convenience functions for working with List.
http://package.elm-lang.org/packages/elm-community/list-extra/latest
MIT License
135 stars 58 forks source link

`unconsLast` #173

Open Chadtech opened 1 year ago

Chadtech commented 1 year ago

When researching the uses of List.Extra.init, I noticed multiple instances in which it was used with List.Extra.last, like..

      case (List.Extra.init list, List.Extra.last list) of 
          (Just init, Just last) ->
              -- ..

This is like List.Extra.uncons except it separates out the last element instead of the first.

Maybe List.Extra should have such a function? I am not sure if unconsLast is the best name.