Class: Prime
- Inherits:
-
Object
- Object
- Prime
- Defined in:
- lib/tonal/extensions.rb
Class Method Summary collapse
-
.within(lower = 0, upper) ⇒ Array
The primes within lower and upper bounds.
Class Method Details
.within(lower = 0, upper) ⇒ Array
Returns the primes within lower and upper bounds.
8 |
# File 'lib/tonal/extensions.rb', line 8 def self.within(lower=0, upper) = self.each(upper).reject{|p| p < lower} |