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.
If you install an app that runs from the shell and you want to add the path to the executable to your PATH env var, just add it to PATH in a .bash_profile file in your user’s home dir – this will be run every time you start a new terminal session:
export PATH=$PATH:your_path_here
open -a TextEdit filename
You can replace TextEdit with any app name to open from the shell