ãç´ç²é¢æ°åè¨èªã¯ãããã°ãã«ãããã ã£ã¦ç´ç²ãªé¢æ°ã§ printf ãããã°ã§ããªããããã¨ã¤ã¶ããã¦ãã人ãããè¦ããã¾ããããã¾ã§æ¾ç½®ãã¦ãã¾ãããããªãã¤ã¼ãã50ãè¶ ããã®ã§ãHaskellã§ã®ãããã°ã«ã¤ãã¦æ¸ãã¾ãã ä¾å¤å¦çã¨åãããã«ãHaskell ã§ã®ãããã°ã§ã¯ãç´ç²ãªé¢æ°ã¨ IO ãåãã¦èããå¿ è¦ããã¾ãã IO ã§ã® printf ãããã° IO ã§ã¯ãputStrLn ã print ã使ããããåé¡ãªãã§ãããï¼ foo :: Int -> IO Bool foo i = do x <- ããã㦠i putStrLn $ "x = " ++ show x ããã㦠putStrLn "ãããéé" -- ããããã y <- ããããã print y return y ã¡ãªã¿ã«ãforkIO èµ·åãã軽éã¹ã¬ãããã putStrLn ããå ´åã軽éã¹
{{#tags}}- {{label}}
{{/tags}}