Doubly-Linked Lists in Scala, with Call by Name and Lazy Vals
1–2 of 2 posts
Re: Doubly-Linked Lists in Scala, with Call by Name and Lazy Vals
#2In 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-...