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

Optimize updateAt #69

Closed pzp1997 closed 7 years ago

pzp1997 commented 7 years ago

Makes updateAt much faster. Benchmarks are showing a greater than 90% decrease in runtime over the current implementation across the board. Additionally, since updateAt is now fast, I changed setAt to just call updateAt. The old implementation of setAt is similar to the new implementation of updateAt, so performance there is approximately the same.