COMP 302 Lecture Notes - Lecture 11: Exclusive Or, Substitution Model

56 views12 pages

Document Summary

The two things that set up this correspondence in f# is: let. It says that the name x and the value 1729 are connected, and thereafter when using the name x, it is replaced by the value 1729. This means that they are only valid for part of the execution of the program. Scope : where a binding is valid (if it is local) is called its scope. Output val x : int x = 1 val y : int = 2 val it : int = 3. The interpreter echos back the bindings that have been made. It has bound x to 1, y to 2, and it to 3. Every expression being evaluated is temporarily assigned the name it. Sometimes, you don"t want a binding to be there all the time; this is when you use a local binding. Output let x = 1 let y = 2 x + y.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents