• Shuffle
    Toggle On
    Toggle Off
  • Alphabetize
    Toggle On
    Toggle Off
  • Front First
    Toggle On
    Toggle Off
  • Both Sides
    Toggle On
    Toggle Off
  • Read
    Toggle On
    Toggle Off
Reading...
Front

Card Range To Study

through

image

Play button

image

Play button

image

Progress

1/5

Click to flip

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

In object-oriented and functional programming, an immutable object is an object whose state cannot be modified after it is created

Function binding (syntax, type-checking, evaluation)

Syntax:


fun x0 (x1 : t1, ..., xn : tn) = e;


where the function name is x0. 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:


includes all the earlier bindings


maps x1 to t1, x2 to t2, ... xn to tn


maps x0 to (t1 * ... * tn -> t).



In 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:


A function is a value - we simply add x0 to the environment as a function that can be called later.

Recursive

A function that determines different on going cases based off of an initial case that will be a rule for all the other cases

Type Inference

Refers to the automatic deduction of the data type of an expression in a programming language

Function Calls (syntax, type checking, evaluation)

Formal function call arguments in ML are combined into a tuple and are considered a single argument