main = putStrLn "Oppai Futomomo Pantie OK!!" -- > Oppai Futomomo Pantie OK!!
main = do cs <- getContents putStr cs -- > % echo 'Oppai' | runghc do.hs -- > Oppai
[1, 2, 3, 4] -- valid ["Hello", "Oppai"] -- valid ['o', 'p', 'p', 'a', 'i'] -- valid [1, 2, "oppai"] -- invalid
main = do cs <- getContents print $ length $ lines cs -- > % runghc wcl.hs < /etc/passwd -- > 65
main = print $ fact 10 -- > 3628800 fact 0 = 1 fact n = n * fact (n - 1)
Keyword(s):
References: