Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

the class PartitionPrimeNumbers has an error at line 36 and don't compile #16

Open
wilsonpenha opened this issue Jul 23, 2017 · 0 comments

Comments

@wilsonpenha
Copy link

public static boolean isPrime(List<Integer> primes, Integer candidate) {
    double candidateRoot = Math.sqrt((double) candidate);
    //return takeWhile(primes, i -> i <= candidateRoot).stream().noneMatch(i -> candidate % i == 0);
    return primes.stream().**takeWhile**(i -> i <= candidateRoot).noneMatch(i -> candidate % i == 0);
}

-> the function takeWhile is invalid or doesn't exists

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant