xref
: /
dports
/
lang
/
ruby26
/
ruby-2.6.9
/
benchmark
/
app_factorial.rb
Home
History
Annotate
Line#
Scopes#
Navigate#
Raw
Download
current directory
1
def
fact
(
n
)
2
if
(
n
>
1
)
3
n
*
fact
(
n
-
1
)
4
else
5
1
6
end
7
end
8
9
100
.
times
{
10
fact
(
5000
)
11
}
12