Implementation made by monkalamari for the Assignment 2 of the Coursera curse on RProgramming