implemented List minimum function for Day2 of Prolog exercises