Eager evaluation computes an argument or expression before the surrounding computation proceeds. A strict function always evaluates its arguments, so square(41.0 + 1.0) receives 42.0; square(sys.error("failure")) raises an exception before square runs. section 5.1
The contrast with nonstrict evaluation makes the boundary visible. Short-circuiting &&, ||, and if avoid evaluating unused branches, while an ordinary variadic apply evaluates each supplied expression before its body constructs a LazyList. Delaying evaluation requires by-name parameters or thunks; without memoization, forcing the same delayed expression can recompute it. section 5.1 section 5.2.1
An eager argument fails before the function body
def square(x: Double): Double = x * x square(sys.error("failure")) The error is raised while evaluating the argument, before square can execute. By contrast, if2(false, sys.error("fail"), 3) can return 3 when its branches are by-name parameters.
def apply[A](as: A*): LazyList[A] = if as.isEmpty then empty else cons(as.head, apply(as.tail*))
Inspect how a variadic LazyList constructor eagerly receives its elements before recursively building the result. section 5.2.1




