Code samples to learn logic programming