Assignment 1

Most of these questions are meant to familiarize you with the Pervasives module. Make sure to confirm that what you type would work by using it in the utop environment first. Also include the two semicolons at the end, when applicable.

  1. Write the expression that would compute the square root of 5.
  2. Write the expression that would concatenate the strings "first string" and "second string".
  3. There is a function that can be used to “print” a string to “standard output” and include a newline at the end. Find it and enter the expression that would thusly print the string "I have printed my first string!".
  4. What value does compare "3" "3.0";; return?
  5. What is wrong with the expression: compare 3 3.0;;? Explain.