PLQ #13Done on:   Tuesday, April 20th

Question 1 @ 2021-04-20 18:20

What will be the output of the following test when running in Picky3 (the one without explicit types)?

(run "{call {fun {x} {call x x}}
            {fun {x} {call {call x x} 99}}}")

Question 2 @ 2021-04-20 18:24

In the Picky3 interpreter, if we decide to swap the order of type checking in the Less case of the typecheck function, transforming it like this:

What changes when we

(run "{+ {< 1 x} 2}")


Question 3 @ 2021-04-20 18:28

What would the following result in our Picky3 interpreter?

(run "{with {identity {fun {x} x}}
        {call {call identity identity}

Question 4 @ 2021-04-20 18:31

In the converted-to-continuations code that we’ve seen in class, we talked about a broken use of continuations:

(web-display (+ (web-read/k "First number" (lambda (n) n))
                (web-read/k "Second number" (lambda (n) n))))

What would happen if we actually try this?