doing some of the prolog 99 problems with core.logic