Skip to content

Commit

Permalink
Add Elm Analyzer comments for concept exercise tisbury-treasure-hunt (
Browse files Browse the repository at this point in the history
  • Loading branch information
jiegillet authored Nov 10, 2023
1 parent 2b466b7 commit 999b484
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# use placeLocationToTreasureLocation

Please use `placeLocationToTreasureLocation` in `treasureLocationMatchesPlaceLocation`, as reusing functions helps with maintainability.
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# use tuple in case

Like the instructions mention, when defining `specialCaseSwapPossible` you should use a `case` statement on a tuple with the three values of interest and pattern match on the combinations that allow swapping.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# use tuple second

You will find that `Tuple.second` is very well suited for defining `countPlaceTreasures`, you can map it on the list of treasures or use it in a `List.filter` function.
Try it out!

0 comments on commit 999b484

Please sign in to comment.