Instructor solution
You may exit out of this review and return later without penalty.
Logic Programming & Macros
1.What is the \+ operator in Prolog used for?
2.In the typing algorithm, how can we deal with equations relating procedures?
3.When making a new substitution, why must me check all previous substitutions?
4.What is the result of the substitution $$T_1 \sigma_1 \sigma_2$$ where $$T_1 = builder(X, Y), \sigma_1={X=bob}, \sigma_2={Y=scoop}$$
5.What are the initial values of σ, failure, and the stack?
6.When using backtracking in Prolog unification, what conditions determine a failure?
7.What are macros?
8.How can we deal with a repeated evaluation error in a macro?
9.What is the difference between macros and functions?
10.How can we implement macros in a language such as the one we implemented in class?
11.What would be the output of this Clojure code?
(-> 5 (+ 3) (/ 2) (- 1))
12.What is function currying?
You may exit out of this review and return later without penalty.