PLQ #7Done on:   Tuesday, October 29th

Question 1 @ 2024-10-29 18:40

Identify all of the primitive value types in Schlac.


Question 2 @ 2024-10-29 18:43

What is the difference between a Y combinator in an eager language vs one in a lazy language?


Question 3 @ 2024-10-29 18:49

How do we evaluate a simple (one-argument) Schlac function call (aka “beta-reduction”) via substitution:

((lambda (x) E1) E2)

(Warning: consider which one is the best answer for Schlac.)


Question 4 @ 2024-10-29 18:50

The answer for the previous question was

((lambda (x) E1) E2) => E1[E2/x]

are there any caveats to consider here?

(Same warning.)


Question 5 @ 2024-10-29 18:52

In Schlac (limited, lazy, auto-curried), with the church encodings and arithmetic functions, what would the following

(->nat ((lambda (x x x) (* (* x x) x))
        1 2 3))

evaluate to?


1, 2, 3, 4, 6, 8, 9, 12, 18, 27, Error