mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-13 20:29:24 +02:00
22 lines
303 B
Plaintext
22 lines
303 B
Plaintext
(module
|
|
(func $fib (export "fib") (param $n i32) (result i32)
|
|
local.get $n
|
|
i32.const 2
|
|
i32.lt_s
|
|
if
|
|
i32.const 1
|
|
return
|
|
end
|
|
local.get $n
|
|
i32.const 2
|
|
i32.sub
|
|
call $fib
|
|
local.get $n
|
|
i32.const 1
|
|
i32.sub
|
|
call $fib
|
|
i32.add
|
|
return
|
|
)
|
|
)
|