Beispiel #1
0
 private static bool HasNoDivisors(int number) =>
 FunctionalExtensions.PotentialPrimeDivisorsOf(number).NoneDivides(number);
Beispiel #2
0
 public static IEnumerable <int> GetAllPrimes(int greaterThan, int range, List <int> primes) =>
 GetAllPrimes(FunctionalExtensions.PrimeCandidates(greaterThan, range), primes);
Beispiel #3
0
 public static IEnumerable <int> GetAllPrimes() =>
 FunctionalExtensions.PrimeCandidates().Where(HasNoDivisors);