Re: Help with propositional formulas

2003-07-21 Thread Graham Klyne
There's a 'powerset' thread on this list [1][2] starting 4th June which I think contains some of the answers you seek. Read and you shall learn! #g -- [1] List archive: http://www.haskell.org/pipermail/haskell-cafe/ [2] Powerset thread starts: http://www.haskell.org/pipermail/haskell-cafe/200

Help with propositional formulas

2003-07-19 Thread Douglas O. Matoso
Hi, I have an school assignment that asks to implement an truth table of propositional formulas. I'm having difficulties in the following part: data Prop = Var Char | Not Prop | And Prop Prop | Or Prop Prop type Subst = [(Char,Bool)] - Define a function bools :: Int -> [[Bool]] that calculates a