Open Chadtech opened 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..
List.Extra.init
List.Extra.last
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.
List.Extra.uncons
Maybe List.Extra should have such a function? I am not sure if unconsLast is the best name.
List.Extra
unconsLast
When researching the uses of
List.Extra.init
, I noticed multiple instances in which it was used withList.Extra.last
, like..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 ifunconsLast
is the best name.