list-extra icon indicating copy to clipboard operation
list-extra copied to clipboard

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

Open rjdellecese opened this issue 3 years ago • 0 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!

rjdellecese avatar Nov 03 '21 21:11 rjdellecese