3 ms·
In this the author makes use of "lazy val forward references" in scala, this allows doing something like this: "lazy val result = new Cons(value, newPrev, resul
by vontman 6y ago
In this the author makes use of "lazy val forward references" in scala, this allows doing something like this: "lazy val result = new Cons(value, newPrev, result)"
Reference: https://www.scala-lang.org/files/archive/spec/2.11/04-basic-declarations-and-definitions.html https://www.scala-lang.org/files/archive/spec/2.11/04-basic-...