arithmetische Ausdrücke:
data Exp = Const Integer | Plus Exp Exp | Times Exp Exp deriving ( Show ) ex1 :: Exp ex1 = Times ( Plus ( Const 1 ) ( Const 2 ) ) ( Const 3 ) value :: Exp -> Integer value x = case x of Const i -> i Plus x y -> value x + value y Times x y -> value x * value y