Skip to content

Latest commit

 

History

History
17 lines (12 loc) · 478 Bytes

Exercise1.md

File metadata and controls

17 lines (12 loc) · 478 Bytes

Exercise 1: Extend zero

The first exercise is to extend the zero function we have just seen.

In the glambda repo, look in the exercises directory and open up Ex1.hs. The code we've been discussing should appear.

Add constructors for

  • [] (the list type)
  • Wrap (defined in the file)
  • () (the unit type), and
  • (->)

Add clauses of zero for these as well.

The solution is available in Ex1.hs in the solutions branch.