Bedarfsauswertung für eine lokale Konstante (Schlüsselwort lazy)
lazy
def F(b:Boolean,x: =>Int):Int = { lazy val y = x; if (b) y*y else 0 } F(true,{print ("foo "); 3}) // foo res8: Int = 9 F(false,{print ("foo "); 3}) // res9: Int = 0