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

free:
Linux operating-sys
OpenOffice office-suite, ver. 3.1+
The GIMP ~photoshop
Firefox web browser
FlashBlock flash on/off

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

© L. Allison   http://www.allisons.org/ll/   (or as otherwise indicated),
Created with "vi (Linux + Solaris)",  charset=iso-8859-1,  fetched Friday, 30-Jul-2010 14:25:33 EST.