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 14, 2017 · 0 comments
Open

Lab1 Exercise 8 #1

BertLisser opened this issue Sep 14, 2017 · 0 comments

Comments

@BertLisser
Copy link

Nice

accuses Matthew name
        |elem name names = True
        |otherwise = False
        where names = [Peter, Jack, Arnold]

but shorter

accuses Matthew name = elem name  [Peter, Jack, Arnold]

A pearl of Haskell code:

honest::[Boy]
honest = filter (\x -> any (accuses x) guilty) boys

Well done!

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

1 participant