Lecture Contents
To understand the different relations between type classes, Type class is a great reference.
This is a fantastic picture.
Home Work
Exercise 1
Exercise 2
Exercise 3
Test code:
Exercise 4
The magical part is (Sized b, Monoid b)
restriction to Sized (a,b)
.
To make it valid, besides the auto implemented
The functions in Sized.hs
is also critical.
Thanks to these functions, the previously implemented indexJ
, dropJ
, takeJ
are still valid to the (Score, Size)