Plan 9 from Bell Labs’s /usr/web/sources/contrib/fernan/nhc98/tests/nhc-bugs/io-re-eval/Main.hs

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


module Main (main) where                      
                                                
import IO                                     
                                                
main :: IO()                                  
main = do _ <- foldl foo (return 14) ["qq\n", "ww\n", "ee\n"]
          putStr ""                           
                                                
foo :: IO Int -> String -> IO Int             
foo io_l s = do l <- io_l                     
                () <- putStr s                
                io_l                       


Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to webmaster@9p.io.