From e45b590bf1775da896dc58f27528f706eb5be447 Mon Sep 17 00:00:00 2001 From: Patrick Oscar Boykin Date: Sun, 22 Sep 2024 11:51:17 -1000 Subject: [PATCH] actually, there is no reason to make loopFn lazy --- core/src/main/scala/cats/Defer.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/main/scala/cats/Defer.scala b/core/src/main/scala/cats/Defer.scala index 518e54f5dc..a4fd3da24d 100644 --- a/core/src/main/scala/cats/Defer.scala +++ b/core/src/main/scala/cats/Defer.scala @@ -91,7 +91,7 @@ trait Defer[F[_]] extends Serializable { */ def recursiveFn[A, B](fn: (A => F[B]) => (A => F[B])): A => F[B] = new Function1[A, F[B]] { self => - lazy val loopFn: A => F[B] = fn(self) + val loopFn: A => F[B] = fn(self) def apply(a: A): F[B] = defer(loopFn(a)) }