Some problems implemented in Prolog