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 59 forks source link

Add cycle #80

Closed pzp1997 closed 6 years ago

pzp1997 commented 7 years ago

Related to #72. After some discussion in that PR, it seemed as though the consensus was to make cycle accept the length of the resulting list (as opposed to e.g. the number of times the given list should be cycled). This PR contains what I believe to be a relatively fast TCO implementation of cycle with the desired behavior (since this would be the initial implementation, there isn't really anything to benchmark it against).

Chadtech commented 7 years ago

Awesome. Looks merge-worthy to me.