eval.in

Paste #681

Haskell — Hugs98 September 2006, pasted 4 years ago

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
data Greeter = MakeGreeter { name :: String }

greet :: Greeter -> IO ()
greet greeter = putStrLn $ "Hello " ++ name greeter ++ "!"

main =
    let
        greeter = MakeGreeter "Charlie"
    in
        greet greeter

Program Output

Hello Charlie!

OK (0.088 sec real, 0.107 sec wall, 19 MB, 31 syscalls)

Fork