--

-- data definitions
data Tree a 
  = Tip a 
  | Fork (Tree a) (Tree a)

-- function definitions

fact n = if n==0 
            then 1 
            else n * (fact (n-1))

depth (Tip a) = 0
depth (Fork x y) =
       1 + max (depth x) (depth y)

-- global variable defintion
tree1 = Fork (Fork (Tip 1) (Tip 2)) (Tip 3)

-- mutual recursion 

evenx 0 = True
evenx n = oddx (n-1)

oddx  0 = False
oddx  n = evenx (n-1)

--