Invoke the supplied function when P is an available ancestor.
Invoke the supplied function when P is an available ancestor. This will be invoked a maximum of one times and zero times if P never appears as an ancestor.
the ancestor type to find
the function to invoke
the manifest for the generic ancestor