Closed jfmengels closed 2 years ago
This makes remove tail-call optimized, meaning it will not blow up the stack when working on lists that are too large.
remove
|This also improves performance:](https://github.com/jfmengels/elm-benchmarks/blob/master/src/ImprovingPerformance/ListExtra/Remove.elm)
I also special-cased the case where the element is not found so that we don't unnecessarily recreate the entire list from the accumulator.
I also added tests for remove and applied elm-format (seems like tests weren't properly formatted).
Awesome work! Thanks @jfmengels
This makes
remove
tail-call optimized, meaning it will not blow up the stack when working on lists that are too large.|This also improves performance:](https://github.com/jfmengels/elm-benchmarks/blob/master/src/ImprovingPerformance/ListExtra/Remove.elm)
I also special-cased the case where the element is not found so that we don't unnecessarily recreate the entire list from the accumulator.
I also added tests for
remove
and applied elm-format (seems like tests weren't properly formatted).