fork(1) download
  1. main = do
  2. putStrLn $ f ["SIMPLE"];
  3. putStrLn $ f ["POLLS", "EPEES"];
  4. putStrLn $ f ["LYES", "APRONS"];
  5. putStrLn $ f ["ABCDE", "a c", "123 567"];
  6. putStrLn $ f ["\"\n$?*", "", ",(.)\\"]
  7.  
  8. f[]=[]
  9. f x=[h|h:_<-x]++f[t|_:t<-x]
Success #stdin #stdout 0s 4700KB
stdin
Standard input is empty
stdout
SIMPLE
PEOPLELESS
LAYPERSONS
Aa1B 2Cc3D E567
",
($.?)*\