Quote Originally Posted by Kennedy View Post
Isn't that two functions? Isn't that almost exactly what I put up there? Is there an echo in this thread?
As I said, in this case the isPrime function wouldn't even be used. Sometimes, in a project that would grow, I would actually add it even if I don't use it directly just for completeness and future extension (as long as it's not too much work).
However, in this case, I'd leave out the function completely. So no, in THIS case it would be one function. In GENERAL case it would be two.