import Data.Listmain :: IO ()main = do text <- getLine print $ inits text
Hello!
["","H","He","Hel","Hell","Hello","Hello!"]
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!