Skip to content
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

Lab1 Exercise 8 #1

Open
BertLisser opened this issue Sep 15, 2017 · 7 comments
Open

Lab1 Exercise 8 #1

BertLisser opened this issue Sep 15, 2017 · 7 comments

Comments

@BertLisser
Copy link

The only thing I found:

-- Those boys who are honest are the ones that have true accusations to those boys who are guilty
honest = [ x | x <- boys, y <- guilty, accuses x y]
dishonest = [x | x <- boys, y <- guilty, not (accuses x y)]

Better is:

-- Those boys who are honest are the ones that have true accusations to those boys who are guilty
honest =nub  [ x | x <- boys, y <- guilty, accuses x y]
dishonest =nub  [x | x <- boys, y <- guilty, not (accuses x y)]

Well done!

@olimoli9160
Copy link
Contributor

olimoli9160 commented Sep 15, 2017 via email

@BertLisser
Copy link
Author

BertLisser commented Sep 15, 2017 via email

@olimoli9160
Copy link
Contributor

olimoli9160 commented Sep 15, 2017 via email

@BertLisser
Copy link
Author

BertLisser commented Sep 15, 2017 via email

@AJGHM-Khonraad
Copy link

Hi Bert,

I can understand where your confusion is at. Maybe you could have a look at

https://github.com/software-engineering-amsterdam/ST2017_WG_13/blob/master/Members/11424907-ToineKhonraad/1/Lab1_Exercise8.hs

We apparently had to agree as a team on the submission dynamics, and will do so for the next coming weeks. Sorry for the inconvenience.

Toine

@PaulSpencer
Copy link

this appears to be my fault. I must have misread the question and not realized that one had to have exactly that signature, I thought it was about getting the correct result.
going forward, do we have to follow the exact signatures?

@BertLisser
Copy link
Author

Yes. That is the first thing to what I glanced: are the types and names correct.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants