What is the correct syntax for using call-by-name evaluation strategy?
By default parameters are evaluated by call-by-value. The following syntax is used for call-by-name:
def someFunc(arg: => Long) = 1

Follow CodeGalaxy

Mobile Beta

Get it on Google Play
Send Feedback
Keep exploring
Scala quizzes
Sign Up Now
or Subscribe for future quizzes