99 questions/46 to 50 If you want to work on one of these, put
your name in the block so we know someone's working on it. Then,
change n in your block to the appropriate problem number, and
fill in the <Problem description>,<example in lisp>,<example in
Haskell>,<solution in haskell> and <description of
implementation> fields. 1 Logic and Codes 2 Problem 46 (**)
Define predicates and/2, or/2, nand/2, nor/2, xor/2, impl/2 and
equ/2 (for logical equivalence) which succeed or fail according
to the result of their respective operations; e.g. and(A,B) will
succeed, if and only if both A and B succeed. A logical
expression in two variables can then be written as in the
following example: and(or(A,B),nand(A,B)). Now, write a
predicate table/3 which prints the truth table of a given
logical expression in two variables. Example: (table A B (and A
(or A B))) true true true true fail true fail true fail fail
fail fail Example in Haskell: > table2 (\a b -> (and' a (or' a
b)) True True True True False True False True Fals