(fail? X) tests if X==:fail first, since this is (or should be) a common outcome of failed unification.