CSE 130 Lecture Notes - Lecture 6: Function Application, Double-Precision Floating-Point Format, Purely Functional Programming
Document Summary
Haskell - a typed, lazy, purely functional language. Unlike js where undefined functions will not complain until you evaluate f(x) Helps find bugs ahead of time (as opposed to @ runtime. Easier to optimize and write faster code. Haskell programs are not statements; they are definitions (functions/values) In a scope where x 1 ,,x n (vars) are defined, all occurrences of expression e (where. Easier to think about - don"t need to worry if x changed after calling f. Don"t evaluate expressions unless result is absolutely necessary. You only evaluate an expression once and cache the result. Can define your own control structures using functions. Committee language - unusually popular (most committee languages never take off) Scope: (let introduces a new scope) let x = 44. You can declare variables wherever you want! a = if y then a" else b". //note how y is defined here (order does not matter!) y = true.