test x (Node v _ l r)
  | x < v  = 1 + test x l
  | x == v = 1
  | x > v  = 1 + test x r
test x (Node v _ l r)
  | x < v  = 1 + test x l
  | x == v = 1
  | x > v  = 1 + test x r
test x (Node v _ l r)
  | x < v  = 1 + test x l
  | x == v = 1
  | x > v  = 1 + test x r