-  Couldn't load subscription status. 
- Fork 132
Closed
Labels
Description
The solution for exercise 1.22 assumes a function is_undefined that was not presented before in the text. We should either change the initial statement (or add a footnote) explaining that we should assume this function exists or we should change the solution. We can interpret the phrase
write a function
search_for_primesthat checks the primality of consecutive odd integers in a specified range
to be a function where you input the start and end of a range and it outputs the timed primality tests of all primes in that range. Something like
function search_for_primes(start, end) { timed_prime_test(start); return start % 2 === 0 ? search_for_primes(start + 1, end) : start > end ? true : search_for_primes(start + 2, end); }