- Start time:
- Mi 17 Mai 2017 16:00:09
- End time:
- Mo 22 Mai 2017 18:00:09
- Reiteration: Partial application (1 P)
- Please explain "currying" to your teammate. In return, your partner should explain "partial application of functions" to you. These are important concepts in Haskell, that you should understand...
- Natural Number Type (3 P)
- Given the algebraic data type Nat from the lecture data Nat = Zero | Succ Nat that represents a natural number. The functions nat2int and int2nat from the lecture might...
- Algebraic Data Types (5 P)
- a) (1 P) Write two type declarations 'Year' and 'Day' that should both be aliases for Int. Also define a new data type 'Month' with the following 12 type constructors: Jan, Feb, Mar, Apr,...
- Folds (4 P)
- a) (1 P) Implement an alternative version of map (name it map2) using foldr. Also write down the type definition of map2. b) (1 P) Implement an alternative version of filter (name...