• 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/12

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;

12 Cards in this Set

  • Front
  • Back

Base Types

like int, bool, unit/singular types

Compound Types

types that contain other types in their definition

"Each of" Compound Type

A compound type t describes values that contain each of values of type t1, t2, and tn

"One of" Compound Type

A compound type t describes values that contain a value of one of the types t1, t2, or tn.

"Self Reference" Compound Type

A compound type t may refer to itself in its definition in order to describe recursive data structures like lists and trees.

Record Types

“each-of” types where each component is a named field

Record Expression

Syntax:


{f1 = e1, ..., fn = en}


where, as always, each ei can be any expression. Here each f can be any field name (though each must be different). A field name is basically any sequence of letters or numbers.



Type-check:


Type-check each expression to get some type ti and then build the record type that has all the right fields with the right types. Alphabetized by REPL when printed.




Evaluation:


Evaluate each expression to a value and create the corresponding record value.

"By Name" access

used for larger compound types

"By position" access

used for smaller compound types

Syntactic Sugar

a way to remember that certain terms are analogous, and keeps things consistent in terms of remembering phrases/terms

Constructor

a special type of subroutine called to create an object. It prepares the new object for use, accepting arguments the constructor using a set required group of member variables.

Enumerator

complete, ordered listing of all the items in a collection