예제 #1
0
def n_primes(n):
    '''Returns 'n' primes.'''
    return list(take(n, primes()))
예제 #2
0
def nth_prime(n):
    '''Calculates the nth prime, as indicated by the caller.'''
    return last(take(n, primes()))