Scala Call by Name vs Call by Value

Scala Logo | Credit: Lightbend, Inc. on Wikimedia
// Java:
int hexDigit = x == 0 ? 5 : 3;
// Scala:
val hexDigit = if (x == 0) 5…

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store