Hello world

LA home
Computing
FP
 Haskell
  Haskell98
File hello.hs
main = putStr "Hello world.\n"

-- Haskell98 Hello world program

NB.
putStr :: String -> IO ()
putStrLn :: String -> IO ()
putChar :: Char -> IO ()
File hello02.hs
main = putStr "Hello " >> putStr "World" >> putStrLn "."

-- Another Hello world

NB. The operator >> combines two (or more) IO actions
7/2002
www #ad:

Haskell:
(:) cons
[x1,...] list
[ ]list
(++) append
\ λ :-)
:: has type
Compared

↑ © L. Allison, www.allisons.org/ll/   (or as otherwise indicated).
Created with "vi (Linux)",  charset=iso-8859-1,   fetched Thursday, 25-Apr-2024 21:18:04 UTC.

Free: Linux, Ubuntu operating-sys, OpenOffice office-suite, The GIMP ~photoshop, Firefox web-browser, FlashBlock flash on/off.