ruby fact.
def fact(n) n <= 1 ? 1 : (2..n).to_a.inject(1) {|s,e| s * e}end
>>9
f=lambda x:reduce(lambda a,b:a*b,xrange(2,x+1)