Exam #1 Topics List
This is a study-guide for the first exam. In addition to reviewing the topics below, I recommend that you go back and make sure you understand the code covered in class and on the homework assignments. The online reference is also useful for studying. Our first exam will cover the material in Chapters 1–8, with the exception of the Chapter 7 material (Modules).
Terms and Topics
Be prepared to define and/or write code examples for the following terms:
- expressions
- defining simple functions
- defining functions via separate rules
- using pattern matching in function definitions
- recursive function definitions
- type inference
- guards
- let and where
- lists and tuples
- list comprehensions
- map, filter, and foldr1 (I wouldn't give you a foldr question)
- lambda expressions
- function composition operator: .
- functions as inputs
- functions as return values
- declaring new data types in Haskell
- using user-defined types in Haskell
- lazy evaluation
We've also discussed several different programming paradigms at this point:
- Imperative Programming:
A programming paradigm based on statements that change a program's state (the values stored in global variables). Programming amounts to sequencing a series of state-changing operations, and therefore tends to focus on how a program produces its results.
- Declarative Programming:
Focuses on what a program should compute, without getting bogged down in how it happens. This is more of an ideal to strive for than a concrete paradigm, though some programming languages are more successful at achieving the declarative programming ideals than others.
- Functional Programming:
Treats computation as the evaluation of mathematical functions, thereby avoiding state and mutable data. Comes closer to the declarative ideal than imperative languages since programmers are often spared the need to think about low-level computational details (i.e. state-changing operations).
- Applicative Programming:
Solving problems by applying built-in (typically higher-order) functions rather than by creating new (typically recursive) functions for the task.