Use LEFT and RIGHT arrow keys to navigate between flashcards;
Use UP and DOWN arrow keys to flip the card;
H to show hint;
A reads text to speech;
5 Cards in this Set
- Front
- Back
immutable |
an object whose state can not be modified after it is created |
|
function binding |
how to define and use functions
fun x0 (x1 : t1, ..., xn : tn) = e;
Syntax: It takes n arguments x1, ... xn of types t1, ..., tn and has an expression e for its body
Type Checking: We type-check the body e in a static environment that:
n addition, for the function binding to type-check, the body e must have the type t, i.e., the result type of x0. t can be any type *
Evaluation: we simply add x0 to the environment as a function that can be called later. x0 is in the dynamic environment in the function body and for subsequent bindings |
|
recursive |
a function definition that can use itself. |
|
type inference |
refers to the automatic deduction of the data type of an expression |
|
function calls |
an expression that uses a separate function to evaluate. |