rf-web/vendor/bundle/gems/rouge-3.12.0/lib/rouge/demos/clean

7 lines
189 B
Plaintext
Raw Normal View History

2019-10-21 08:18:17 +00:00
delete :: !a !.(Set a) -> Set a | < a
delete x Tip = Tip
delete x (Bin _ y l r)
| x < y = balanceR y (delete x l) r
| x > y = balanceL y l (delete x r)
| otherwise = glue l r