remove redundant call to 'delete' in 'shift'

This commit is contained in:
Don Stewart
2007-04-30 03:11:51 +00:00
parent 8265cae8a8
commit df7d1d95fa

View File

@@ -152,7 +152,7 @@ rotate o w = maybe w id $ do
-- exception is thrown.
--
shift :: (Integral i, Ord a) => i -> StackSet i j a -> StackSet i j a
shift n w = maybe w (\k -> insert k n (delete k w)) (peek w)
shift n w = maybe w (\k -> insert k n w) (peek w)
-- | /O(log n)/. Insert an element onto the top of stack 'n'.
-- If the element is already in the stack 'n', it is moved to the top.