ex 8 question 1 final 2019 ex3 type class
Sorry, I don't understand why in exercise 8 we have: (using Eq[T])
given EqList[T] (using Eq[T]): Eq[List[T]] with extension (x: List[T]) def === (y: List[T]): Boolean = (x, y) match case (hx :: tx, hy :: ty) => hx === hy && tx === ty case (Nil, Nil) => true case _ => false
and in exam 2019 ex 3 we have : ( given Hash[T], Hash[U],Hash[S] )
given TripleHash[T,U,S] (given Hash[T],Hash[U],Hash[S]): Hash[(T,U)] def hash(triple:(T,U,S): Long= mix(mix(digest(triple._1,digest(triple._2)),digest(triple._3)))
Is it because the language changed?
thank you in advance