elm-community / list-extra

Convenience functions for working with List.

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

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

`unconsLast`

Chadtech opened this issue · comments

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.