
28 Jan
2010
28 Jan
'10
3:44 p.m.
I wrote a simple program: it reads the contents from standard in and reverses the order of the lines. I imagine there are many cleaner ways to do this. Anybody willing to post some rewrites? Thanks, Tim main = interact reverseFile reverseFile s = unlines $ lines $ foldr combineStr [] (lines s) combineStr s1 s2 = s2 ++ "\n" ++ s1