columnFormat :: [String] -> Alignment
columnFormat cells
    | length lefts > length rights = LeftAligned w
    | otherwise = RightAligned w
    where
        fmts = map cellKind cells
        (rights, lefts) = partition (==Number) fmts
        w = maximum $ map length cells

-- add left or right padding to each cell according to the column alignment
columnFormat :: [String] -> Alignment
columnFormat cells
    | length lefts > length rights = LeftAligned w
    | otherwise = RightAligned w
    where
        fmts = map cellKind cells
        (rights, lefts) = partition (==Number) fmts
        w = maximum $ map length cells

-- add left or right padding to each cell according to the column alignment
columnFormat cells
    | length lefts > length rights = LeftAligned w
    | otherwise = RightAligned w
    where
        fmts = map cellKind cells
        (rights, lefts) = partition (==Number) fmts
        w = maximum $ map length cells

-- add left or right padding to each cell according to the column alignment