Differences

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

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
fp2023:lab06 [2023/04/07 10:58]
pdmatei
fp2023:lab06 [2023/04/10 10:53] (current)
pdmatei
Line 70: Line 70:
 <​code>​ <​code>​
 groupBy(List("​john",​ "​mary",​ "​mihai"​))(_.size) = List((4,​List("​john","​mary"​)),​ (5, List("​mihai"​))) groupBy(List("​john",​ "​mary",​ "​mihai"​))(_.size) = List((4,​List("​john","​mary"​)),​ (5, List("​mihai"​)))
-groupBy(List((1,​2),​ (2,1), (3,3))(p => p._1 + p._2) = List((3,​List((1,​2),​(2,​1)),​ (6, List((3,​3)))+groupBy(List((1,​2),​ (2,1), (3,3))(p => p._1 + p._2) = List((3,​List((1,​2),​(2,​1))), (6, List((3,​3)))
 </​code>​ </​code>​
  
Line 89: Line 89:
 **6.2.3.** Write a function which checks is there exist identical names under different domains in a list of emails (e.g. ''​ana@amazon.com''​ and ''​ana@gmail.com''​) **6.2.3.** Write a function which checks is there exist identical names under different domains in a list of emails (e.g. ''​ana@amazon.com''​ and ''​ana@gmail.com''​)
 <code scala> <code scala>
-def containsDuplicates(l:​ List[Email]): ​List[Email] ​= ???+def containsDuplicates(l:​ List[Email]): ​Boolean ​= ???
 </​code>​ </​code>​