We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e2715fd commit 22a4195Copy full SHA for 22a4195
first-class-functions/src/test/scala/scalaexamples/firstclassfunctions/PersonTest.scala
@@ -52,10 +52,7 @@ class PersonTest extends EmptyTest {
52
def testHasMultipleEmails {
53
// Split the list of persons into two new lists containing
54
// techies (more than one email address) and luddites (zero or only one email address)
55
- val (techies, luddites) = persons partition (_.emailAddresses match {
56
- case List(_, _, _*) => true
57
- case _ => false
58
- })
+ val (techies, luddites) = persons.partition(_.emailAddresses.size > 1)
59
60
assertEquals(List(fredrik), techies)
61
assertEquals(List(alf, johannes), luddites)
0 commit comments