A few notes for myself so I don’t forget:
A function like:
f(x) = x * x
is declared in Scala like:
def square(x : Int) = x * x
… which is a function called square, which takes a value x which is of type Int, and calculates the square of x.
Articles, notes and random thoughts on Software Development and Technology
A few notes for myself so I don’t forget:
A function like:
f(x) = x * x
is declared in Scala like:
def square(x : Int) = x * x
… which is a function called square, which takes a value x which is of type Int, and calculates the square of x.