git.iko.soy/typeable/pandoc
on master help sign in
HLint: Use all

Replace `and . map` with `all`.

commit1ed2c467c9442934c060257f6e191a5a3d6c1e38 authorHenry de Valence <hdevalence@hdevalence.ca> dateThu 19 Dec 2013, 17:06 (13 years ago) parent8053ba2
2 files changed+5−5
src/Text/Pandoc/Shared.hs+1−1 src/Text/Pandoc/Writers/LaTeX.hs+4−4
src/Text/Pandoc/Shared.hs+1−1
@@ -532,7 +532,7 @@ headerShift n = walk shift
532532
533533-- | Detect if a list is tight.
534534isTightList :: [[Block]] -> Bool
535−isTightList = and . map firstIsPlain
535+isTightList = all firstIsPlain
536536 where firstIsPlain (Plain _ : _) = True
537537 firstIsPlain _ = False
538538
src/Text/Pandoc/Writers/LaTeX.hs+4−4
@@ -443,7 +443,7 @@ blockToLaTeX (DefinitionList lst) = do
443443 incremental <- gets stIncremental
444444 let inc = if incremental then "[<+->]" else ""
445445 items <- mapM defListItemToLaTeX lst
446− let spacing = if and $ map isTightList (map snd lst)
446+ let spacing = if all isTightList (map snd lst)
447447 then text "\\itemsep1pt\\parskip0pt\\parsep0pt"
448448 else empty
449449 return $ text ("\\begin{description}" ++ inc) $$ spacing $$ vcat items $$
@@ -764,9 +764,9 @@ citationsToNatbib cits
764764 | noPrefix (tail cits) && noSuffix (init cits) && ismode NormalCitation cits
765765 = citeCommand "citep" p s ks
766766 where
767− noPrefix = and . map (null . citationPrefix)
768− noSuffix = and . map (null . citationSuffix)
769− ismode m = and . map (((==) m) . citationMode)
767+ noPrefix = all (null . citationPrefix)
768+ noSuffix = all (null . citationSuffix)
769+ ismode m = all (((==) m) . citationMode)
770770 p = citationPrefix $ head $ cits
771771 s = citationSuffix $ last $ cits
772772 ks = intercalate ", " $ map citationId cits