Task

Demonstrate how to check whether the input device is a terminal or not.



Related task

   Check output device is a terminal


let () =
  print_endline (
    if Unix.isatty Unix.stdin
    then "Input comes from tty."
    else "Input doesn't come from tty."
  )