Skip to content

Commit

Permalink
Merge pull request #20 from stuarth/dict-update-with-a-result
Browse files Browse the repository at this point in the history
Dict.update uses a Result
  • Loading branch information
Anton-4 authored Sep 26, 2024
2 parents 07f3ee9 + f4307dc commit 1bb6485
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
12 changes: 6 additions & 6 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package/InternalEAWGen.roc
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,8 @@ groupedRanges =
|> List.walk (Dict.empty {}) \s, range ->
Dict.update s range.0 \value ->
when value is
Present lst -> Present (List.append lst (range.1, range.2))
Missing -> Present (List.single (range.1, range.2))
Ok lst -> Ok (List.append lst (range.1, range.2))
Err Missing -> Ok (List.single (range.1, range.2))

testsStr : Str
testsStr =
Expand Down

0 comments on commit 1bb6485

Please sign in to comment.