mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
15 lines
322 B
Plaintext
15 lines
322 B
Plaintext
{
|
|
function fib(i) -> y {
|
|
y := 1
|
|
if gt(i, 2) {
|
|
y := add(fib(sub(i, 1)), fib(sub(i, 2)))
|
|
}
|
|
}
|
|
sstore(0, fib(8))
|
|
}
|
|
// ----
|
|
// Trace:
|
|
// Memory dump:
|
|
// Storage dump:
|
|
// 0000000000000000000000000000000000000000000000000000000000000000: 0000000000000000000000000000000000000000000000000000000000000015
|