github.com/graybobo/golang.org-package-offline-cache@v0.0.0-20200626051047-6608995c132f/x/talks/2014/static-analysis/fib.go (about)

     1  // +build OMIT
     2  
     3  package main
     4  
     5  import "fmt"
     6  
     7  func fib(x int) int {
     8  	if x < 2 {
     9  		return x
    10  	}
    11  	return fib(x-1) + fib(x-2)
    12  }
    13  
    14  func main() {
    15  	fmt.Println(fib(7))
    16  }