Docstring for binarySearch, nextPrime function