repo.or.cz
/
ruby-svn.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
history
|
raw
|
HEAD
* transcode.c (trans_open_i): check the result of rb_transcoding_open.
[ruby-svn.git]
/
benchmark
/
other-lang
/
ack.rb
blob
7451bed6c46714b10935327646f73c6a02c8d882
1
def ack(m, n)
2
if m == 0 then
3
n + 1
4
elsif n == 0 then
5
ack(m - 1, 1)
6
else
7
ack(m - 1, ack(m, n - 1))
8
end
9
end
10
11
NUM = 9
12
ack(3, NUM)