use concat

This commit is contained in:
Joey Hess 2011-01-09 18:23:58 -04:00
parent 9de1192c57
commit c2b13a88bf
2 changed files with 2 additions and 2 deletions

View file

@ -64,7 +64,7 @@ data Command = Command {
prepCmd :: Command -> [String] -> Annex [Annex Bool] prepCmd :: Command -> [String] -> Annex [Annex Bool]
prepCmd Command { cmdseek = seek } params = do prepCmd Command { cmdseek = seek } params = do
lists <- mapM (\s -> s params) seek lists <- mapM (\s -> s params) seek
return $ map doCommand $ foldl (++) [] lists return $ map doCommand $ concat lists
{- Runs a command through the start, perform and cleanup stages -} {- Runs a command through the start, perform and cleanup stages -}
doCommand :: CommandStart -> CommandCleanup doCommand :: CommandStart -> CommandCleanup

View file

@ -438,7 +438,7 @@ encodeGitFile s = foldl (++) "\"" (map echar s) ++ "\""
e_num c = showoctal $ ord c e_num c = showoctal $ ord c
-- unicode character is decomposed to -- unicode character is decomposed to
-- Word8s and each is shown in octal -- Word8s and each is shown in octal
e_utf c = foldl (++) "" $ map showoctal $ e_utf c = concat $ map showoctal $
(encode [c] :: [Word8]) (encode [c] :: [Word8])