Refactor
This commit is contained in:
@@ -288,10 +288,14 @@ startDrag (a, b) cfig w = setcontext
|
|||||||
concurrentIS :: IS.IntSet -> Bool
|
concurrentIS :: IS.IntSet -> Bool
|
||||||
concurrentIS = go . IS.minView
|
concurrentIS = go . IS.minView
|
||||||
where
|
where
|
||||||
go Nothing = True
|
go x = fromMaybe True $ do
|
||||||
go (Just (i, is)) = fromMaybe True $ do
|
(i,is) <- x
|
||||||
(j, js) <- IS.minView is
|
(j, js) <- IS.minView is
|
||||||
return $ i + 1 == j && go (Just (j, js))
|
return $ i + 1 == j && go (Just (j, js))
|
||||||
|
-- go Nothing = True
|
||||||
|
-- go (Just (i, is)) = fromMaybe True $ do
|
||||||
|
-- (j, js) <- IS.minView is
|
||||||
|
-- return $ i + 1 == j && go (Just (j, js))
|
||||||
|
|
||||||
collectInvItems :: Int -> IS.IntSet -> World -> World
|
collectInvItems :: Int -> IS.IntSet -> World -> World
|
||||||
collectInvItems secid is w = fromMaybe w $ do
|
collectInvItems secid is w = fromMaybe w $ do
|
||||||
|
|||||||
Reference in New Issue
Block a user