doc-src/Tutorial/Ifexpr/bool2if
author wenzelm
Wed, 25 Nov 1998 14:11:24 +0100
changeset 5966 60f80b2a2777
parent 5377 efb799c5ed3c
permissions -rw-r--r--
removed prs / prs_fn (broken, because it did not include \n in its semantics, forcing writeln to add one uncoditionally); replaced prs_fn by writeln fn;

consts bool2if :: boolex => ifex
primrec
"bool2if (Const b) = CIF b"
"bool2if (Var x)   = VIF x"
"bool2if (Neg b)   = IF (bool2if b) (CIF False) (CIF True)"
"bool2if (And b c) = IF (bool2if b) (bool2if c) (CIF False)"