A helper operator for use in
composeOne. It takes a condition
and a function taking a groupdatum to action. If
p is true,
it executes the resulting action. If it fails, it returns
Nothing from the
Query so
composeOne will go on
and try the next rule.