Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Branch: master
Fetching contributors…

Cannot retrieve contributors at this time

executable file 11 lines (8 sloc) 0.402 kB
#!/usr/bin/env runhaskell
import System.Environment
import Data.List
main = interact $ \text -> let rows = map words (lines text)
cols = transpose rows
rows' = transpose $ map (\col -> map (padTo (maximum (map length col))) col) cols
in unlines $ map unwords rows'
padTo n s = s ++ replicate (n - length s) ' '
Jump to Line
Something went wrong with that request. Please try again.