> say you have this code : > > putStrLn "1" >> putStrLn "2" >> putStrLn "3" > > you can imagine each of the calls to putStrLn gets implicitly passed a > variable (here, the world ) and they happen in succession so it's > "like a loop".
It breaks down further as soon as you add any amount of complexity to the code as well. E.g.: putStrLn "1" >> getLine >>= \line -> putStrLn line >> putStrLn "end" This prints something, gets something from the user and prints it, and then prints something else. The equivalent imperative pseudo-code is something like: print "foo"; line = inputLine(); print line; print "end"; Not loop-ish at all! _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe