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;
8 Cards in this Set
- Front
- Back
Scope Of Binding |
The later bindings in that let-expression and the “body” of the let-expression (the e) |
|
ML let expression (syntax, semantics, type checking) |
Syntax: let b1 b2 ... bn in e end where each bi is a binding and e is an expression.
Semantics: much like the semantics of the top-level bindings in our ML program
Type Checking:we can use all the earlier bindings for the later ones, and we can use them all for e |
|
ML options: |
Option value has either 0 or 1 thing:NONE is an option value “carrying nothing” whereas SOME e evaluates e to a value v and becomes the option carrying the one value v. The type of NONE is ’a option and the type of SOME e is t option if e has type t |
|
andalso (syntax, semantics, type checking) |
Syntax:e1 andalso e2
Type Checking: e1 and e2 must both have type bool and the entire expression also has type bool
Semantics:he result is true if e1 and e2 evaluate to true |
|
orelse (syntax, semantics, type checking) |
Syntax : e1 orelse e2
Semantics: It evaluates e2 only if e1 evaluates to false ,he result is true if e1 or e2 evaluates to true.
Type Checking : e1 and e2 must both have type bool and the entire expression also has type bool. |
|
immutable data |
data that can not be mutated |
|
aliasing |
Returning a copy of previously defined data |
|
Idioms |
common approaches to using the language features to express computations |