mirror of
https://github.com/koalaman/shellcheck.git
synced 2025-08-22 09:07:33 +08:00
Use mapM instead of implementing a slower version of it
This commit is contained in:
@@ -431,7 +431,7 @@ checkWrongArithmeticAssignment params (T_SimpleCommand id (T_Assignment _ _ _ _
|
|||||||
insertRef _ = Prelude.id
|
insertRef _ = Prelude.id
|
||||||
|
|
||||||
getNormalString (T_NormalWord _ words) = do
|
getNormalString (T_NormalWord _ words) = do
|
||||||
parts <- foldl (liftM2 (\x y -> x ++ [y])) (Just []) $ map getLiterals words
|
parts <- mapM getLiterals words
|
||||||
return $ concat parts
|
return $ concat parts
|
||||||
getNormalString _ = Nothing
|
getNormalString _ = Nothing
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user