I\'m going crazy: Where is the Ruby function for factorial? No, I don\'t need tutorial implementations, I just want the function from the library. It\'s not in Math!
I just wrote my own:
def fact(n) if n<= 1 1 else n * fact( n - 1 ) end end
Also, you can define a falling factorial:
def fall_fact(n,k) if k <= 0 1 else n*fall_fact(n - 1, k - 1) end end