This Haskell program just aligns the text lines on the given substrings.I took inspiration from here, but my code is not golfed.import Data.Functionimport Data.Ordimport Data.Listimport Data.List.SplitalignOn :: String -> [String] -> [String]alignOn char lines = map padline lines  where     partBeforechar = head . splitOn char    longestLengthBeforeChar = maximum $ map (length . partBeforechar) lines    padline line = replicate offset ' ' ++ line      where        offset = longestLengthBeforeChar - (length (partBeforechar line))main = do  mapM putStrLn $ alignOn , [Programming, Puzzles, And, Code Golf]  mapM putStrLn $ alignOn ,  [Code, Review, And Other, improvements]  mapM putStrLn $ alignOn abc [Example abc bar, foo abc Example]Output:Programming, Puzzles        And, Code Golf     Code, ReviewAnd Other, improvementsExample abc bar    foo abc Example
Aligning text in Haskell
strings;haskell;formatting