Hello, I have just started learning Haskell and have got stumped on how to add a rating to a custom data type.
The data type I'm using has a name, a year and a tuple (userName and their rating), it looks like:
data Wine = Wine String Int [Rating] deriving (Eq,Ord,Show,Read)
type Rating = (String, Int)
I wanted to allow a user to rate a given wine from a database, stored as [Wine] but cant figure out how to to it. Any pointers or suggestions would be greatly appreciated! Thanks.