4 ms·
Doubly-Linked Lists in Scala, with Call by Name and Lazy Vals
- vontman 6y agoIn 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-...