PLQ #5Done on:   Tuesday, February 22nd

Question 1 @ 2022-02-22 18:34

Consider the following FLANG test:

(test "{with {x 5}
        {with {f {fun {y} {+ x y}}}
          {with {x 3}
            {call f 4}}}}"
      => 9)

If this test succeeds, which kind of scope is it using?


Question 2 @ 2022-02-22 18:37

Examine the following code block in the context of the dynamically-scoped version of FLANG. What does it evaluate to?

{with {f {with {x 100} {fun {y} {+ x y}}}}
  {with {x 10}
    {call f 1}}}

Question 3 @ 2022-02-22 18:41

Which of the following is true about substitution caches?


Question 4 @ 2022-02-22 18:43

What are the possible use cases for dynamic scoping?