I read Scala Functions (part of Another tour of Scala). In that post he stated:
Methods and functions are not the same thing
Practically, a Scala programmer only needs to know the following three rules to use functions and methods properly:
def
and function literals defined by =>
are functions. It is defined in page 143, Chapter 8 in the book of Programming in Scala, 4th edition.someNumber.foreach(println)
After four editions of Programming in Scala, it is still an issue for people to differentiate the two important concepts: function and function value because all editions don't give a clear explanation. The language specification is too complicated. I found the above rules are simple and accurate.