Longest common suffix: Difference between revisions
m
→{{header|Haskell}}: Reduced slightly with foldr
(→{{header|Python}}: Added a draft in Python) |
m (→{{header|Haskell}}: Reduced slightly with foldr) |
||
Line 220:
longestCommonSuffix :: [String] -> String
longestCommonSuffix =
foldr (flip (<>) . return . head) [] .
main :: IO ()
|