Skip to content
What else would you do with go/parser
Go
Branch: master
Clone or download
pathbox and eatonphil Fix README.md (#4)
Hi 
    I find something wrong in the code example in README, so I fix it
```
println(15)  =>  println(fib(15))
```
Latest commit a421458 Oct 23, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
examples
.gitignore
README.md
main.go

README.md

goi

An interpreter for Go.

Use

$ go build main.go
$ cat examples/iterative_fib.go
package main

func fib(n int) int {
	a := 0
	b := 0
	c := 1

	for i := 1; i < n-1; i++ {
		a = b
		b = c
		c = a + b
	}

	return c
}

func main() {
	println(fib(15))
}
$ ./main examples/iterative_fib.go
377
You can’t perform that action at this time.