Code written while going through Prolog tutorials.