class Integer

Public Instance Methods

factorial() click to toggle source
# File lib/ms_abundance_sim.rb, line 23
def factorial
  # https://www.rosettacode.org/wiki/Factorial#Ruby (fastest and most concise)
  (2..self).reduce(1, :*)
end