PLQ #5Done on:   Tuesday, October 19th

Question 1 @ 2021-10-19 18:12

In a dynamically-scoped version of Flang, what would the following evaluate to?

{with {f {fun {x} {call f x}}}
  {call f 0}}

Question 2 @ 2021-10-19 18:15

What are the advantages of dynamic scope?


Question 3 @ 2021-10-19 18:17

What are the disadvantages of dynamic scope?


Question 4 @ 2021-10-19 18:19

What do we get if we run the following code:

(define (foobar)
  (+ x y z))

(define (fun z)
  (foobar))

(let* ([x 2] [y 4]) ; same as two nested `let`s
  (fun 3))

(Choose the best answer.)