open console

main =  
  let fname = prompt "What's your first name?"
  in
  let name = (fname, prompt "What's your last name?")
  in
  print_greeting name
  where
    print_greeting fn ln = printf "Hello, {0} {1}" fn ln
    prompt msg = writen msg `seq` write ">" `seq` readn()
open console

main =  
  let
    fname = prompt "What's your first name?"
    name = (fname, prompt "What's your last name?")
  in
    print_greeting name
  where
    print_greeting (fn,ln) = printf "Hello, {0} {1}" fn ln
    prompt msg = writen msg `seq` write ">" `seq` readn()