What is an expression?
A fragment of code that produces a value.
What is a binding?
It is a statement that is used to catch and hold a value. It consists of a keyword followed by a name of the binding and, if you want to give it a value, followed by an = operator and an expression.
What is an environment?
It is the collection of bindings and their values that exist at a given time.
What is a function?
A function is a type of value with a piece of program wrapped in the value. E.g.:
The binding prompt
Holds a function
That shows a dialog box that asks for user input.
You call a function by putting parenthesis after an expression that produces a function value, e.g;
Give an example of a function.
What is a side effect?
When a statement changes the state of the machine in such a way that it will affect the statements that come after it, like showing a dialog box or writing text to the screen.
Give an example of a function that produces a side effect and another function that produces a value.
Side effect: prompt();
What is control flow?
It is the sequence in which statements are executed.
What is conditional execution?
When we want to follow a branching pathway if a certain condition is met.
What kind of keyword do you need to use to invoke conditional execution?