mirror of
https://github.com/xmonad/xmonad-contrib.git
synced 2025-08-01 12:41:52 -07:00
historyCompletion: prefer Data.Map.foldr over deprecated fold function
This commit is contained in:
@@ -1215,7 +1215,7 @@ historyCompletion = historyCompletionP (const True)
|
|||||||
-- name satisfies the given predicate.
|
-- name satisfies the given predicate.
|
||||||
historyCompletionP :: (String -> Bool) -> ComplFunction
|
historyCompletionP :: (String -> Bool) -> ComplFunction
|
||||||
historyCompletionP p x = fmap (toComplList . M.filterWithKey (const . p)) readHistory
|
historyCompletionP p x = fmap (toComplList . M.filterWithKey (const . p)) readHistory
|
||||||
where toComplList = deleteConsecutive . filter (isInfixOf x) . M.fold (++) []
|
where toComplList = deleteConsecutive . filter (isInfixOf x) . M.foldr (++) []
|
||||||
|
|
||||||
-- | Sort a list and remove duplicates. Like 'deleteAllDuplicates', but trades off
|
-- | Sort a list and remove duplicates. Like 'deleteAllDuplicates', but trades off
|
||||||
-- laziness and stability for efficiency.
|
-- laziness and stability for efficiency.
|
||||||
|
Reference in New Issue
Block a user