Consider the first-order functional program  f x = x + 8  g…

Consider the first-order functional program  f x = x + 8  g w = w * 5  h y = y – 2where we want to evaluate h (g (f 7)) using substitutions. Show the result of the first evaluation step for Call-By-Value, and also the result of the first evaluation step for Call-By-Name.  

Part II: Free Response Questions The next three questions ar…

Part II: Free Response Questions The next three questions are free response questions. I understand that these questions are displayed as “Spacer” in the list on the right side of the screen. I acknowledge that there are three free-response questions on this exam, which I must complete on paper during the allotted exam time. I also understand that I will write my responses on three different sheets of paper, show them to the camera before submitting the exam, and take pictures to upload to the Free Response for Test 2 using the provided link in the Exams module.

Now assume that sequential composition is wrongly interprete…

Now assume that sequential composition is wrongly interpreted by the code let rec commExec: commC -> environment -> runTimeState -> runTimeState =  fun cmd env state ->   match state with      (sto,inp,outp) ->   match cmd with         …   | SeqC([]) -> state   | SeqC(cmd1 :: cmds) ->        commExec cmd1 env (commExec (SeqC cmds) env state) Write the list that is then the result of interpreting (on an empty input list) the program  var x;  x = 1;  write x;  x = 3;  write x;  x = 5