Skip to content

Instantly share code, notes, and snippets.

@sadache
Created May 5, 2010 15:05
Show Gist options
  • Save sadache/390901 to your computer and use it in GitHub Desktop.
Save sadache/390901 to your computer and use it in GitHub Desktop.
Scala lazy val? not really.
lazy val xxxx={ println("initializing xxxx");1}
def getOne(x:Int):Int= 1
println(getOne(xxxx));
@sadache
Copy link
Author

sadache commented May 5, 2010

prints
initializing xxxx
1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment