PLQ #4Done on:   Tuesday, February 4th

Question 1 @ 2025-02-04 18:18

What does it mean for functions to be a first-class citizens in a programming language?


Question 2 @ 2025-02-04 18:23

Which of the following are true about different treatments of functions in programming languages?


Question 3 @ 2025-02-04 18:26

What would be the result of running this expression using our Flang language implementation (the one with substitutions)?

{with {+ *} {+ 1 2}}

Question 4 @ 2025-02-04 18:30

Given the following code and one sample test:

(define (fix1 f x)
  (lambda (y) (f x y)))

(test ((fix1 mul 10) 5) => 50)

Which of the following type declarations is best for fix1?


Question 5 @ 2025-02-04 18:34

Which of the following FLANG expressions are equivalent in terms of how they get evaluated (ie, ignoring substitutions on the way)?

(Be careful when you think about it.)