We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
The remark if the puzzle is wel-designed is not an assumption. So the function guilty must return a list of boys. A proposal to rewrite the code is:
evaluateAll :: [Boy] -> [[Bool]] -> [(Boy, [Bool])] evaluateAll [] y = [] evaluateAll (x:xs) [] = evaluateAll xs $ nub $ permutations testimonyValidities evaluateAll (x:xs) (y:ys) = if evaluateSentences x y then [(x, y)] ++(evaluateAll (x:xs) ys) else evaluateAll ([x]++xs) ys -- guilty finds the boy who's guilty. guilty :: [Boy] guilty = [fst x| x<-evaluateAll boys $ permutations testimonyValidities]
Wel done!
The text was updated successfully, but these errors were encountered:
Thank you for the feedback Bert
Sorry, something went wrong.
No branches or pull requests
The remark if the puzzle is wel-designed is not an assumption.
So the function guilty must return a list of boys.
A proposal to rewrite the code is:
Wel done!
The text was updated successfully, but these errors were encountered: