- Use a full sheet of 8½ x 11" paper. (Half sheet? Half credit!)
- Put your last name and first initial in the far upper left hand corner of the paper, where a staple would hit it. (It helps when sorting quizzes!)
Mitchell, W.
- No need to write out questions.
- Numbering responses may help you avoid overlooking a question; it's ok to go ahead and pre-number your sheet.
- Two minutes; six questions, plus one extra credit question.
- Can everybody see this line?
Quiz 2, January 22, 2018
2 minutes; 1 + ½ + ½ + ½ + ½ + 1 points; 4 (corrected; was 3) points total
- What are the three aspects of an expression that we often consider?
- What operation in Haskell has higher precedence than any operator?
- How would the following type be read aloud?
f :: Int -> Bool
- Name one characteristic of the functional paradigm.
- What is an example of (1) a Haskell type (2) a Haskell type class?
- Tell me something you learned from the flipped lecture on paradigms.
EC ½ point: What does REPL stand for?
Answers
- What are the three aspects of an expression that we often consider?
Value, type, and side-effect (reversed vest: t-se-v)
- What operation in Haskell has higher precedence than any operator?
function call
- How would the following type be read aloud?
f :: Int -> Bool
"f has type int to bool"
- Name one characteristic of the functional paradigm.
Functions that are like mathematical functions; no side-effects; functions are values; recursion in place of looping.
- What is an example of (1) a Haskell type (2) a Haskell type class?
Types: Int
, Char
, Bool
Classes: Num
, Fractional
, Bounded
, Eq
, Ord
- Tell me something you learned from the flipped lecture on paradigms.
A paradigm provides a conceptual framework for understanding and solving problems;
a paradigm has a world view, vocabulary, and a set of techniques for solving problems.