b.rb

ntys (ding ding), 12/04/2009 07:56 pm

Download (321 Bytes)

 
1
#This program doesn't work with "ruby 1.9.1p129 (2009-05-12 revision 23412) [i386-mswin32]"
2
#But it's OK with "ruby 1.9.1p0"
3

    
4

    
5
f=lambda{|x|
6
    return 1 if x<=1
7
    f[x-1]*x
8
  }
9
puts f[1000]
10

    
11

    
12

    
13

    
14
END {
15
    puts 'Now Exiting'       #This won't be excuted.And NO Error Message will be printed out, either.
16
}