refactored predicates and added tests

*//1 now functions as an interface, dispatching patterns to
appropriate, specialized predicates. This removes the need for
retesting the argument passed to *//1 on each iteration.

Test suite expanded.