0

I'm trying to implement a for-comprehension function to find the prime numbers between 2 and n. The function needs to be of the type: primes : Int -> List[Int]. I'm trying to implement it using this checker: def isPrime(n: Int) = List.range(2, n) forall (x => n % x != 0).

Guts
  • 1

0 Answers0