6 lines
87 B
Go
6 lines
87 B
Go
func fib(a int) int {
|
|
if a < 2 {
|
|
return a
|
|
}
|
|
return fib(a - 1) + fib(a - 2)
|
|
}
|