function hasMethod(name) {
  return (obj) => typeof obj[name] === 'function';
}
Returns a predicate function to filter objects based on whether a method of the provided
name is present.
@param {String} name - the method name to find
@returns {Function} - the resulting predicate function