Skip to content

Commit 08a29e1

Browse files
author
Javier de Silóniz Sandino
authored
Merge pull request #37 from floating-cat/to_list_implementation
Fix incorrect implementation
2 parents bdfd74f + 0320214 commit 08a29e1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/scala/fpinscalalib/StrictnessAndLazinessSection.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ object StrictnessAndLazinessSection
3737
*/
3838
def streamToListAssert(res0: List[Int]): Unit = {
3939
def toList[A](s: Stream[A]): List[A] = s match {
40-
case Cons(h, t) => h() :: t().toListRecursive
40+
case Cons(h, t) => h() :: toList(t())
4141
case _ => List()
4242
}
4343

0 commit comments

Comments
 (0)