Learning Prolog, one exercise at a time