Advertisement
Ailrun

Untitled

Aug 13th, 2022
1,992
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. member x Nil = False
  2.   member x (Node l y r)
  3.     | x < y     = member x l
  4.     | otherwise = go x y r
  5.     where
  6.       go x y Nil = x == y
  7.       go x y (Node l y' r)
  8.        | x < y'    = go x y  l
  9.         | otherwise = go x y' r
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement