Skip to content

Commit

Permalink
Merge pull request #319 from nonpop/fix-string-diff-stack-overflow
Browse files Browse the repository at this point in the history
Make makeChangesHelp tail recursive
  • Loading branch information
Richard Feldman authored Nov 19, 2018
2 parents dfdb0b7 + 74a7736 commit 8171975
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/Test/Runner/Node/Vendor/Diff.elm
Original file line number Diff line number Diff line change
Expand Up @@ -213,11 +213,12 @@ makeChangesHelp changes getA getB ( x, y ) path =
else
Err (UnexpectedPath ( x, y ) path)
in
change
|> Result.andThen
(\c ->
makeChangesHelp (c :: changes) getA getB ( prevX, prevY ) tail
)
case change of
Err err ->
Err err

Ok c ->
makeChangesHelp (c :: changes) getA getB ( prevX, prevY ) tail



Expand Down

0 comments on commit 8171975

Please sign in to comment.