diff --git a/src/main/scala/stdlib/Lists.scala b/src/main/scala/stdlib/Lists.scala index cbec1923..6260d52a 100644 --- a/src/main/scala/stdlib/Lists.scala +++ b/src/main/scala/stdlib/Lists.scala @@ -148,7 +148,7 @@ object Lists extends FlatSpec with Matchers with exercise.Section { /** Lists reuse their tails */ - def reuseTailsLists(res0: Int, res1: Int, res2: Int, res3: String, res4: String, res5: String) { + def reuseTailsLists(res0: Int, res1: Int, res2: Int, res3: List[Int], res4: List[Int], res5: List[Int]) { val d = Nil val c = 3 :: d val b = 2 :: c diff --git a/src/test/scala/exercises/stdlib/ListsSpec.scala b/src/test/scala/exercises/stdlib/ListsSpec.scala index 5beafa5c..fa527a2f 100644 --- a/src/test/scala/exercises/stdlib/ListsSpec.scala +++ b/src/test/scala/exercises/stdlib/ListsSpec.scala @@ -126,13 +126,12 @@ class ListsSpec extends Spec with Checkers { ) } - // FIXME: depends on #259 - // def `lists share tails` = { - // check( - // Test.testSuccess( - // Lists.reuseTailsLists _, - // HNil - // ) - // ) - // } + def `lists share tails` = { + check( + Test.testSuccess( + Lists.reuseTailsLists _, + 1 :: 2 :: 3 :: List(2, 3) :: List(3) :: List.empty[Int] :: HNil + ) + ) + } }