- Running the Example Programs: get set up to work examples in the Mozart Programming System, used in this text
- Chapter 1: Introduction to Programming Concepts
p. xxix
- Install the Mozart Programming System (MPS) (http://mozart-oz.org/).
- Set up the "Basic system supplements" in the Mozart Oz "run commands" file: .ozrc
- Place the contents of http://www.info.ucl.ac.be/people/PVR/ds/booksuppl.oz in a file named .ozrc in your home directory.
- Appendix A: Mozart System Development Environment (pp. 815-818) has some documentation on how to use the MPS.
Please reach out to the #sf-bookstudy-ctmcp channel on Slack if you have any problems!
pp. 1-26
- What's the difference between a variable and a value?
- The example function
Fact
on the bottom of p. 2 has anif... else... end
statement. This statement has noreturn
or equivalent syntax. Yet the expression returns a value. How does this work? - Um, calling the
Fact
function uses curly braces and no parentheses! How does this work?
- Explain the
H|T
syntax. - In what way is
H|T
recursive? - Which concrete data type (CDT) does
H|T
point at? - Explain the
L.1
andL.2
syntax. - In the Pattern Matching subsection, on p. 6, the
case
statement is a form of destructuring binding, a.k.a. destructuring assignment. Explain how this works.
- In the The main function subsection, on p.7, the example uses
declare
with variable names that remains unbound. The text glosses over the fact that this is forward declaration. Explain.
@TODO: Sections 1.6 onwards