CSE 130 Lecture Notes - Lecture 6: Function Application, Double-Precision Floating-Point Format, Purely Functional Programming

45 views3 pages

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.

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