Skip to content

Instantly share code, notes, and snippets.

@Abhiroop
Last active October 30, 2017 12:00
Show Gist options
  • Save Abhiroop/4642ec42484bbe58be93fd098eb25843 to your computer and use it in GitHub Desktop.
Save Abhiroop/4642ec42484bbe58be93fd098eb25843 to your computer and use it in GitHub Desktop.
member :: (Ord a) => a -> Tree a -> Bool
member x E = False
member x (T _ a y b)
| x < y = member x a
| x == y = True
| otherwise = member x b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment