genericPrimalityTest = (primalityTest, n) => {
  if (n <= 1) {
    return false;
  }
  return primalityTest(n);
}
Checks whether a number is prime using a given primality test

@param Function
@param Number

@return Boolean