Skip to content

Commit

Permalink
Bumped Elm, updated changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
Chadtech committed Jul 10, 2022
1 parent 0717c19 commit 22cb6ea
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 16 deletions.
3 changes: 3 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
### 8.6.0
1. `stoppableFoldl` function and `Step` type added. A stoppable fold has better performance in cases where a fold can be terminated part way through.

### 8.5.2
1. Performance improvement to `remove` by making it tail call optimized.
2. Performance improvement to `updateAt` by only computing list head when necessary.
Expand Down
2 changes: 1 addition & 1 deletion elm.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"name": "elm-community/list-extra",
"summary": "Convenience functions for working with List",
"license": "MIT",
"version": "8.5.2",
"version": "8.6.0",
"exposed-modules": [
"List.Extra"
],
Expand Down
17 changes: 2 additions & 15 deletions src/List/Extra.elm
Original file line number Diff line number Diff line change
Expand Up @@ -1244,26 +1244,13 @@ indexedFoldr func acc list =
second (List.foldr step ( List.length list - 1, acc ) list)


{-| A custom type used for stoppable folds.
stoppableFoldl
(\n acc ->
if acc >= 50 then
Stop acc
else
Continue (n + acc)
)
0
(List.range 1 10000)
--> 55
-}
{-| A custom type used for stoppable folds.-}
type Step a
= Continue a
| Stop a



{-| A `foldl` that can stop early instead of traversing the whole list.
stoppableFoldl
Expand Down

0 comments on commit 22cb6ea

Please sign in to comment.