Skip to content

Fixing a few typos in Solution.hs #28

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 27, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions Homework08/Solution.hs
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ wine3 = Rose 12 :: Kind

-- Question 4
-- In the world of wines, bottles display all of the above information for the consumer on its label.
-- Create a record type called "Label" that captures the grapes that are in a whine, the region its from,
-- and it's kind. Notice that some wines are a blended combination of multiple grapes!
-- Create a record type called "Label" that captures the grapes that are in a wine, the region it's from,
-- and its kind. Notice that some wines are a blended combination of multiple grapes!
-- Additionally, create for each of the described wine below a label.

data Label = Label {
Expand All @@ -58,12 +58,12 @@ data Label = Label {

larrosaRose = Label {grapes = [grape4], region = region3, kind = Rose 14 }

-- Castiglioni is a red wine from the region of Tuscany. It is made from the the grape Sangiovese and
-- Castiglioni is a red wine from the region of Tuscany. It is made from the grape Sangiovese and
-- has a alcohol level of 12.5%.

castiglioni = Label {grapes = [grape1], region = region2, kind = Red 12.5 }

-- Bordeaux is know for its red wine, these are mainly a blend between Cabernet-sauvignon and Merlot.
-- Bordeaux is known for its red wine, these are mainly a blend between Cabernet-sauvignon and Merlot.
-- Create a Label for the wine "Le Petit Haut Lafitte" that has an alcohol percentage 13.5%.

lePetitHaitLafitte = Label {grapes = [grape2, grape3], region = region1, kind = Red 13.5 }
Expand All @@ -77,4 +77,4 @@ containsGrape labels grape = any (\Label{grapes=xs} -> grape `elem` xs) labels

-- This is a test list for the `containsGrape` function with an grape that is not in the list.
grapeList = [larrosaRose,castiglioni,lePetitHaitLafitte]
newGrape = "Pinot Noir"
newGrape = "Pinot Noir"