Source: https://web.stanford.edu/class/archive/cs/cs106l/cs106l.1176/lectures/lecture09/09_Functions.pdf