COMPSCI 1JC3 Lecture Notes - Lecture 2: Injective Function, Type System, Natural Number

25 views3 pages

Document Summary

Booleans - represent truth values (true and false) Floating point numbers - represent rational numbers. Tuples - represent sequences of values of different kinds. Lists - represent sequence of values of same type. Compound expression by applying a function or operator to other expressions. 1 + 2: false, 10000000000, the secret is , x1887 (identifier) Integer - the set of all integers. Integer -> integer denotes the set of functions from integer to integer. Type checking option available in haskell (before it is evaluated) How to check type of expression e: Type error happens when a value of one type is used where a value of another type is. Integers represent full set of all possible number. Int and float are finite because they represent a fixed number of bits (n bits so only 2^n. Definition 1: a function is a rule f: i - > o. Every input is associated with at most one output.

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