Module 1A: Beginning Student Language primitive: a built-in element provided by BSL (Beginning Student Language) value: a primitive data element, like a number, string, image, or boolean number: a value that represents a number, like `7`, `-5`, `3.1`, or `#1.4142` string: a value that represents a sequence of characters, like `"foo"` image: a value that represents a non-text item, like `(star 3 "solid" "red")` comment: a section of code that BSL ignores, which is everything after `;` expression: a value or something that reduces to a value; everything that does not start with `define` in BSL in parentheses is an expression evaluate: the action that BSL does to expressions to reduce them to values operator: a primitive function that consumes expressions and produces a value operand: an expression that follows the operator in a primitive call primitive call: `( ...)` calls a primitive operator primitive rule: reduce all operands to values, then apply operator to them constant: `(define )` defines a named constant use constants to provide an easy to change single point of control constant rule: reduce expression to value, then replace all names by the value argument: a value passed to a function as its consumed input parameter: a name that is replaced by the arguments of a function call function: `(define ( ...) )`, expr is its body use functions to avoid redundancy and add higher-level meaning to code function call: `( ...)` with one expression per parameter function rule: reduce all expressions to arguments, then replace function's name by its body, which has its parameters replaced by its arguments boolean: a value that represents an answer to a yes-no question, like `true` predicate: an operator or a function which produces a boolean value, like `=` conditional: `(if )`, whose exprs are question with boolean value, true answer, and false answer respectively if rule: reduce question to value; if value is `true` replace if expression by true answer, if value is `false` replace by false answer, otherwise error short-circuit evaluation: `and` stops if expr false, `or` stops if expr true Module 1B: How to Design Functions design: the process of making structured solution from poorly-formed problem signature: a comment about types in a function, like `Number String -> Image` purpose: a one-line summary of what a function produces given what it consumes stub: a syntactically valid function definition, like `(define (foo x) 0)` use stubs for scaffolding and to ensure that unit tests are well-formed unit test: `(check-expect )`, error if expressions are not equal use many examples to clarify problem and ensure validity for all cases template: a boilerplate function definition, like `(define (foo x) (... x))` use templates to lay out structure and take inventory of usable items how to design functions: 1. write signature, purpose, stub 2. make unit tests (wrapped in check-expect for BSL) 3. copy template 4. code body 5. debug boundary condition: an often tricky case at the limits of an input parameter code coverage: tests must cover all cases, uncovered cases blacked in BSL Module 2: How to Design Data multi-armed conditional: `(cond [ ] ...)`, bracket is question-answer pair, questions must produce boolean, last can be `else` cond rule: error if no expressions, otherwise reduce first question to value; if value is `true` or `else` replace cond expression with first answer, if value is `false` remove the first question and answer, otherwise error problem domain: the domain that has information about the problem to be solved program domain: the domain that only has data translated from the problem info type comment: a comment that defines a new type and describes how to form it data definition: a type definition with template for function that consumes it also shows how to represent information as data and interpret data as info how to design data: 1. define a structure if compound 2. write type comment 3. add interpretation 4. make examples 5. create function template 6. run atomic data: data that cannot be broken into pieces, like `Image` or `false` non-distinct: the property of an item which can be any in a set, like `String` distinct: the property of an item which can only be one value, like `"red"` interval: data that represents numbers in a range, like `Integer[0, 10]` enumeration: data that represents a fixed number of distinct atomic items itemization: data that represents two or more subclasses, at least one which is non-distinct, like `one of: false, "red", "yellow", "green", Number` can use `else` for last question in itemizations and large enumerations mixed data itemization: itemization with different primitive types in it guard using type-specific predicates to avoid acting on the wrong type the structure of the information gives the structure of the data, which gives the structure of the template, which gives the structure of the function Module 3A: How to Design Worlds interactive: the property of a program in which user input changes the output polymorphic: the property of a function which can consume many different types world specification: `(big-bang (