functions
def abs = 1
abs + 1
def abs() = 1
abs() + 1
def abs(x) = x
def abs(x) = { x + 1 }
def +?%&(x) = x //Allowed to have symbols name functiondef abs(x: Double):Double = {
def absHelper() = x
absHelper()
}
val result = {
val x = f(3)
x * x
}TAIL RECURSION == LOOPS (Reuse stack space)
Anonymous
Special Arg Types
CASE match
Partial Application
Variable Length Args
Representation
Currying
Generics
Last updated