Skip to content

Commit

Permalink
fixing FIXME.
Browse files Browse the repository at this point in the history
  • Loading branch information
kazu-yamamoto committed Jan 31, 2012
1 parent 9c9fa35 commit 6f35e82
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 0 additions & 1 deletion Data/Set/BUSplay.hs
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,6 @@ maximum t = case uncurry splay $ searchMax t of
s@(Node _ x _) -> (x, s)

----------------------------------------------------------------
-- FIXME: this is top down

{-| Deleting the minimum element.
Expand Down
5 changes: 4 additions & 1 deletion Data/Set/Splay.hs
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,10 @@ False
member :: Ord a => a -> Splay a -> (Bool, Splay a)
member x t = case split x t of
(l,True,r) -> (True, Node l x r)
_ -> (False, t) -- FIXME
(Leaf,_,r) -> (False, r)
(l,_,Leaf) -> (False, l)
(l,_,r) -> let (m,l') = deleteMax l
in (False, Node l' m r)

----------------------------------------------------------------

Expand Down

0 comments on commit 6f35e82

Please sign in to comment.