/*this is a predicate, as it's sole purpose is to make some
assertion about something.*/
bool IsNameBob(string name)
{
return name == "Bob";
}
/*Whereas this is not a predicate, as it's performing an action
then evaluating to true if it succeeds. */
bool DoSomethingCool() {
try
{
ImDoingSomethingCool();
}
catch
{
return false;
}
return true;
}