We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(module (func $fibonacci (param $i i32) (result i32) (local $a i32) (local $b i32) (local $tmp i32) (set_local $a (i32.const 1)) (set_local $b (i32.const 0)) (loop $done $loop (if (i32.le_s (get_local $i)(i32.const 1))(br $done) (block (set_local $tmp (get_local $a)) (set_local $a (i32.add (get_local $a)(get_local $b))) (set_local $b (get_local $tmp)) (set_local $i (i32.sub (get_local $i)(i32.const 1))) ) ) (br $loop) ) (get_local $a) ) (export "fib" $fibonacci) )
The text was updated successfully, but these errors were encountered:
(module (export "fib" (func $fib)) (func $fib (param $n i32) (result i32) (if (i32.lt_s (get_local $n) (i32.const 2) ) (return (i32.const 1) ) ) (return (i32.add (call $fib (i32.sub (get_local $n) (i32.const 2) ) ) (call $fib (i32.sub (get_local $n) (i32.const 1) ) ) ) ) ) )
Sorry, something went wrong.
(module (type $t0 (func (param i32) (result i32))) (func $fib (export "fib") (type $t0) (param $n i32) (result i32) get_local $n i32.const 2 i32.lt_s if $I0 i32.const 1 return end get_local $n i32.const 2 i32.sub call $fib get_local $n i32.const 1 i32.sub call $fib i32.add return))
code added in e3949e1, closing
No branches or pull requests
The text was updated successfully, but these errors were encountered: