Skip to content

Instantly share code, notes, and snippets.

@Abhiroop
Last active October 30, 2017 12:00
Show Gist options
  • Save Abhiroop/9d16c0e552a37de58e150464bb4bab54 to your computer and use it in GitHub Desktop.
Save Abhiroop/9d16c0e552a37de58e150464bb4bab54 to your computer and use it in GitHub Desktop.
del :: (Ord a) => a -> Tree a -> Tree a
del x t@(T _ l y r)
| x < y = delL x t
| x > y = delR x t
| otherwise = fuse l r
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment