[PL] Introduction to Programming Languages Exercise 8

임승재·2023년 4월 12일

프로그래밍언어

목록 보기
5/6

Exercise 8.1

With the following list of function definitions in F1VAE:

def twice(x)=x + x 
def x(y)=y 
def f(x)=x + 1 
def g(g)=g 

Show the results of evaluating the following expressions under the empty environment. When it is an error, describe which error it is.

  1. twice(twice)
    Free identifier error twice
  2. val x=5 in x(x)
    5
  3. g(3)
    3
  4. g(f)
    Free identifier error f
  5. g(g)
    Free identifier error g
profile
KAIST Computer Science

0개의 댓글