COMPSCI 1JC3 Lecture Notes - Lecture 2: Injective Function, Type System, Natural Number
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.