Complete first two exercises.
Complete third exercise (implement set->predicate function).