Welcome to Software Development on Codidact!
Will you help us build our independent community of developers helping developers? We're small and trying to grow. We welcome questions about all aspects of software development, from design to code to QA and more. Got questions? Got answers? Got code you'd like someone to review? Please join us.
Haskell revision question. [closed]
Closed as unclear by Alexei†on Nov 28, 2022 at 06:24
This question cannot be answered in its current form, because critical information is missing.
This question was closed; new answers can no longer be added. Users with the reopen privilege may vote to reopen this question if it has been improved or closed incorrectly.
The answer for this question is that there is something wrong with the expression of the first guard of this function below:
congratulations :: [(String, Int)] -> [String]
congratulations [] = []
congratulations ((name,mark):rest)
| mark > 40 = name
| otherwise = congratulations rest
What should be the correct expression for the first guard of the function and why?
2 comment threads