elm-community / list-extra

Convenience functions for working with List.
http://package.elm-lang.org/packages/elm-community/list-extra/latest
MIT License
135 stars 58 forks source link

Cycle 0 list = [] ? #149

Open bitterjug opened 3 years ago

bitterjug commented 3 years ago

If the cycle length is zero, shouldn't we be returning a list of length zero? https://github.com/elm-community/list-extra/blob/7ae12a5da9c1337188b415d70bc0d49df2db61b3/src/List/Extra.elm#L205

Chadtech commented 3 years ago

Yes, and I think that is the case, because cycleLength comes from the List.length of input list. So when cycleLength is zero, the input list is returned, which was necessarily an empty list.