I have an algebraic data type called Person looks like this:
data Person =
Person { firstName :: String
, lastName :: String
, height :: Float
, age :: Int
} deriving (Show, Eq)
I also have a list of Person filled with various information about people, now say I want to return all the data of one specific Person based on firstName alone, how would I do that?
Like search through all the firstNames stored in the list, and then returning either Just Person if the query matches or Nothing if there isn't any match