19 lines
246 B
Text
19 lines
246 B
Text
// Assuming code is in Integer.fibonacci() method
|
|
() Integer
|
|
[
|
|
if this < 2
|
|
[this]
|
|
else
|
|
[
|
|
!prev: 1
|
|
!next: 1
|
|
2.to_pre this
|
|
[
|
|
!sum : prev + next
|
|
prev := next
|
|
next := sum
|
|
]
|
|
|
|
next
|
|
]
|
|
]
|