Homework 8
This homework is based on Sections 6, 7 and 8 of the Textbook.
Version updated on Sun 23 May 2021 04:15:21 PM PDT.
Problems
Solve the following problems of the textbook:
- 6.5.(b)
- 6.8
- 6.11.(b)
A proposed solution for this problem, note that the figure number in the
question is wrong, it should be Fig 6.18, is:
expr -> term { (+ | -) term }
term -> factor { (* | /) factor }
factor -> ( expr ) | number
number -> digit { digit }
digit -> 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9
What is confusing (possibly incorrect) in this proposed solution?
6.22
6.42.(a)
7.7.(a) through (f)
7.8 Only the last question: "What does the program print using
each kind of scope rule?"
7.15
8.4
8.14
8.29.(a) In Haskell syntax: f g x = g (g x).