Skip to content

Commit

Permalink
solution2.2.6.4.scala fixed
Browse files Browse the repository at this point in the history
Signed-off-by: Andreas Roehler <[email protected]>
  • Loading branch information
andreas-roehler committed Apr 14, 2024
1 parent ad3b871 commit d03d9e5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion chapter02/worksheets/solution2.2.6.4.scala
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def filterMap[A, B](xs: Seq[A])(pred: A => Boolean)(f: A => B): Seq[B] = {
}

val result = filterMap(Seq(1, 2, 3, 4)) { x => x > 2 } { x => x * 10 }
val expected = Seq[Int] = List(30, 40)
val expected: Seq[Int] = List(30, 40)
assert(result == expected)

// scala> filterMap(Seq(1, 2, 3, 4)) { x => x > 2 } { x => x * 10 }
Expand Down

0 comments on commit d03d9e5

Please sign in to comment.