playing with a Prolog implementation