Coprime triplets: Difference between revisions

m
Line 186:
( spacedTable
justifyRight
(chunksOf 10 (fmap show <$> xs))
)
 
Line 194:
(Int -> Char -> String -> String) -> [[String]] -> String
spacedTable aligned rows =
in unlines $
let columnWidths =
fmapunwords
(maximum . fmap length)zipWith
(`aligned` ' (transpose rows')
(maximum . fmap length <$> transpose rows)
in unlines $
<$> fmaprows
(unwords . zipWith (`aligned` ' ') columnWidths)
rows
 
justifyRight :: Int -> Char -> String -> String
9,655

edits