Examples and exercises from "Learn Prolog Now"