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

`groupsOfVarying` behaves inconsistently with groups of length `0`

rjdellecese opened this issue · comments

> import List.Extra as List
> List.groupsOfVarying [0, 1] ["a"]
[[],["a"]] : List (List String)
> List.groupsOfVarying [1, 0] ["a"]
[["a"]] : List (List String)

I would expect the second expression to evaluate to [["a"], []]. But at the very least, I would expect the two to be symmetrical!