By-name Parameters - Scala Documentation


#1

By-name parameters are only evaluated when used. They are in contrast to by-value parameters. To make a parameter called by-name, simply prepend => to its type.


This is a companion discussion topic for the original entry at http://docs.scala-lang.org//tutorials/tour/by-name-parameters.html.html