summaryrefslogtreecommitdiffstats
path: root/StackSet.hs
diff options
context:
space:
mode:
authorDon Stewart <dons@cse.unsw.edu.au>2007-04-30 05:11:51 +0200
committerDon Stewart <dons@cse.unsw.edu.au>2007-04-30 05:11:51 +0200
commita2bcd150f362e4a61eea871fa73f5830b4e697cc (patch)
tree07d3152622b091660c2158833e6164eb6e718165 /StackSet.hs
parentccdb9d2f939d586b4a2058d78ccf496f0a920aad (diff)
downloadmetatile-a2bcd150f362e4a61eea871fa73f5830b4e697cc.tar
metatile-a2bcd150f362e4a61eea871fa73f5830b4e697cc.zip
remove redundant call to 'delete' in 'shift'
darcs-hash:20070430031151-9c5c1-7d66b13bc36af0e33af655f33ef287c8d4a379e7
Diffstat (limited to 'StackSet.hs')
-rw-r--r--StackSet.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/StackSet.hs b/StackSet.hs
index f21306f..b455315 100644
--- a/StackSet.hs
+++ b/StackSet.hs
@@ -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.