mirror of
https://github.com/wren-lang/wren.git
synced 2026-01-11 14:18:42 +01:00
Mainly to get rid of one top level directory. But this will also be useful when there are tests of the embedding API.
14 lines
173 B
Ruby
14 lines
173 B
Ruby
def fib(n)
|
|
if n < 2 then
|
|
n
|
|
else
|
|
fib(n - 1) + fib(n - 2)
|
|
end
|
|
end
|
|
|
|
start = Time.now
|
|
for i in 0...5
|
|
puts fib(28)
|
|
end
|
|
puts "elapsed: " + (Time.now - start).to_s
|