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

Lab3: Ex 4 #3

Open
BertLisser opened this issue Sep 27, 2017 · 0 comments
Open

Lab3: Ex 4 #3

BertLisser opened this issue Sep 27, 2017 · 0 comments

Comments

@BertLisser
Copy link

Forgotten the first line module Lab3 where.
Forgotten in the definition:

-- Generate a random number between 1 and 4, and create a proposition that matches the number
-- 1: conjunction, 2: disjunction, 3: implication, 4: equivalence, 5: a Proposition
genPropHelper counter = do
    a <- genOp
    prop1 <- (genPropHelper (counter - 1))
    prop2 <- (genPropHelper (counter - 1))
    case a of 
        1 -> do
            return (Cnj [prop1, prop2])
        2 -> do
            return (Dsj [prop1, prop2])
        3 -> do
            return (Impl prop1 prop2)
        4 -> do
            return (Equiv prop1 prop2)
        5 -> do
            x <- genPropInt
            return (Prop x)

the negation Neg

OK (=6)

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