diff --git a/Bar.scala b/Bar.scala new file mode 100644 index 0000000..923afbf --- /dev/null +++ b/Bar.scala @@ -0,0 +1,21 @@ +import scala.concurrent.duration._ + + +object Test { + lazy val delayedValue: String = { + Thread.sleep(5.seconds.toMillis) + println("Evaluated!") + "Value" + } + + def main(args: Array[String]): Unit = { + println("Start!") + println("I will happen before `delayedValue` evaluation :(") + foo(delayedValue) + println(delayedValue) + } + + def foo(bar: String) = { + println("I will happen after `delayedValue` evaluation! :D") + } +} \ No newline at end of file diff --git a/foo.txt b/foo.txt index f0b5b32..82d6a55 100644 --- a/foo.txt +++ b/foo.txt @@ -1,5 +1,3 @@ Once upon a time, nestled within the data-swept realm of the Internet, existed an ancient, abandoned Git repository named CodeLandia. For eons, it languished in obscurity, haunted by forgotten snippets of codes and unresolved bugs. One day, a valiant young programmer named Ada discovered CodeLandia, recognizing its potential. With a brave heart and swift fingers, she resolved the bugs, streamlined the code, and breathed life into the abandoned repository. And thus, CodeLandia bloomed, transforming from a forgotten relic into a thriving, useful repository, a testament to Ada's diligence and the undying magic of code. -Change! - -More change! +#_#