-
-
Notifications
You must be signed in to change notification settings - Fork 946
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Elm Analyzer comments for concept exercise
tisbury-treasure-hunt
(
- Loading branch information
Showing
3 changed files
with
10 additions
and
0 deletions.
There are no files selected for viewing
3 changes: 3 additions & 0 deletions
3
analyzer-comments/elm/tisbury-treasure-hunt/use_placeLocationToTreasureLocation.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
3 changes: 3 additions & 0 deletions
3
analyzer-comments/elm/tisbury-treasure-hunt/use_tuple_in_case.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
4 changes: 4 additions & 0 deletions
4
analyzer-comments/elm/tisbury-treasure-hunt/use_tuple_second.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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! |