3 ms·
pretty sure scala (and most FP) has a well-defined "what to do when you leave off the return statement", not one that "is up to the compiler"
by dnautics 5y ago
pretty sure scala (and most FP) has a well-defined "what to do when you leave off the return statement", not one that "is up to the compiler"
- gizmo686 5y agoNot just FP. "Return the value of the last statement" is fairly common in imperative languages as well. Off the top of my head both Pearl and R do so as well.