21.1. Functional Programming - Part 1¶
21.1.1. RP 5 part 2¶
Topics of the day:
- How to add annotations to a Jison grammar to produce an interpreter, rather than just a parser (see previous chapter)
- Introduction to functional programming
The review problem set for today contains five review problems. The first one (see previous chapter) is about grammars. The four remaining problems are in this section.
This problem deals with the syntax and semantics of the fp.cons
function.
21.1.2. RP 5 part 3¶
This problem deals with the semantics of the fp.hd
, fp.tl
, and
fp.cons
functions. Note that this problem is randomized. You must
solve it correctly three times in a row to earn the point associated
with it.
21.1.3. RP 5 part 4¶
This problem deals with the syntax and semantics of the fp.hd
,
fp.tl
, and fp.isEq
functions.
21.1.4. RP 5 part 5¶
This problem once more helps you review the semantics of the fp.hd
,
fp.tl
, and fp.cons
functions.