Skip to content

groupsOfVarying behaves inconsistently with groups of length 0 #156

@rjdellecese

Description

@rjdellecese
> 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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions