Question 7
Alonzo's computer uses prefix expressions: (max x₁ … xₙ) returns the greatest input; (min x₁ … xₙ) the least; (+ x₁ … xₙ) their sum; (* x₁ … xₙ) their product. Inputs are real numbers and operations may nest. For example, (+ (* 2 3) (+ 1 2))=9. Evaluate:
(+ (max (min 3 9 2) (* (min 0 4) (max 0 4))) (min (max 3 6) (max 5 7 2)))
(+ (max (min 3 9 2) (* (min 0 4) (max 0 4))) (min (max 3 6) (max 5 7 2)))