diff --git a/compiler/load/tests/fixtures/build/app_with_deps/AStar.roc b/compiler/load/tests/fixtures/build/app_with_deps/AStar.roc index 849c820a23..3c719d7642 100644 --- a/compiler/load/tests/fixtures/build/app_with_deps/AStar.roc +++ b/compiler/load/tests/fixtures/build/app_with_deps/AStar.roc @@ -25,7 +25,7 @@ initialModel = \start -> cheapestOpen : (position -> F64), Model position -> Result position [ KeyNotFound ]* cheapestOpen = \costFunction, model -> - folder = \position, resSmallestSoFar -> + folder = \resSmallestSoFar, position -> when Map.get model.costs position is Err e -> Err e @@ -42,7 +42,7 @@ cheapestOpen = \costFunction, model -> else Ok smallestSoFar - Set.walk model.openSet folder (Err KeyNotFound) + Set.walk model.openSet (Err KeyNotFound) folder |> Result.map (\x -> x.position) @@ -105,7 +105,7 @@ astar = \costFn, moveFn, goal, model -> modelWithNeighbours = { modelPopped & openSet : Set.union modelPopped.openSet newNeighbours } - modelWithCosts = Set.walk newNeighbours (\nb, md -> updateCost current nb md) modelWithNeighbours + modelWithCosts = Set.walk newNeighbours modelWithNeighbours (\md, nb -> updateCost current nb md) astar costFn moveFn goal modelWithCosts diff --git a/compiler/load/tests/fixtures/build/interface_with_deps/AStar.roc b/compiler/load/tests/fixtures/build/interface_with_deps/AStar.roc index d2f35bd65a..2734330984 100644 --- a/compiler/load/tests/fixtures/build/interface_with_deps/AStar.roc +++ b/compiler/load/tests/fixtures/build/interface_with_deps/AStar.roc @@ -25,7 +25,7 @@ initialModel = \start -> cheapestOpen : (position -> F64), Model position -> Result position [ KeyNotFound ]* cheapestOpen = \costFunction, model -> - folder = \position, resSmallestSoFar -> + folder = \resSmallestSoFar, position -> when Dict.get model.costs position is Err e -> Err e @@ -42,7 +42,7 @@ cheapestOpen = \costFunction, model -> else Ok smallestSoFar - Set.walk model.openSet folder (Err KeyNotFound) + Set.walk model.openSet (Err KeyNotFound) folder |> Result.map (\x -> x.position) @@ -105,7 +105,7 @@ astar = \costFn, moveFn, goal, model -> modelWithNeighbours = { modelPopped & openSet : Set.union modelPopped.openSet newNeighbours } - modelWithCosts = Set.walk newNeighbours (\nb, md -> updateCost current nb md) modelWithNeighbours + modelWithCosts = Set.walk newNeighbours modelWithNeighbours (\md, nb -> updateCost current nb md) astar costFn moveFn goal modelWithCosts diff --git a/compiler/solve/tests/solve_expr.rs b/compiler/solve/tests/solve_expr.rs index ecef19861b..fadd1d5a0b 100644 --- a/compiler/solve/tests/solve_expr.rs +++ b/compiler/solve/tests/solve_expr.rs @@ -3396,7 +3396,7 @@ mod solve_expr { cheapestOpen : Model position -> Result position [ KeyNotFound ]* cheapestOpen = \model -> - folder = \position, resSmallestSoFar -> + folder = \resSmallestSoFar, position -> when resSmallestSoFar is Err _ -> resSmallestSoFar Ok smallestSoFar -> @@ -3689,7 +3689,7 @@ mod solve_expr { List.walkBackwards "# ), - "List a, b, (a, b -> b) -> b", + "List a, b, (b, a -> b) -> b", ); }