Skip to content

Instantly share code, notes, and snippets.

@pfcoperez
Created February 9, 2018 18:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pfcoperez/818956cf21f3aeb6659a9752a88e6d88 to your computer and use it in GitHub Desktop.
Save pfcoperez/818956cf21f3aeb6659a9752a88e6d88 to your computer and use it in GitHub Desktop.
class C(val x: Int, lazyNext: => C) { lazy val next = lazyNext }
lazy val head: C = new C(1, tail)
val tail: C = new C(2, head)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment