Skip to content

Commit 0320214

Browse files
authored
Fix incorrect implementation
1 parent fe88dcc commit 0320214

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)