Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
fp2025:lab09 [2026/05/16 23:04]
silviu
fp2025:lab09 [2026/05/16 23:16] (current)
silviu
Line 52: Line 52:
 </​code>​ </​code>​
  
-**9.2.** Modify this type to use the correct variance:+**9.2.** Modify this type to use the correct variance ​to the generic parameter:
  
 <code scala> <code scala>
Line 92: Line 92:
       println(" ​ -> No animals matched this criteria."​)       println(" ​ -> No animals matched this criteria."​)
     } else {     } else {
-      ​matches.foreach(animal => println(s" ​ -> MATCH: ​${animal.name}"))+      println(s" ​ -> There were ${matches.lengthmatches.")
     }     }
 } }