diff --git a/articles/golang.md b/articles/golang.md index ee7f696..a30c51a 100644 --- a/articles/golang.md +++ b/articles/golang.md @@ -44,7 +44,8 @@ package main import "fmt" -// functions starting in uppercase are exported +// Functions starting in uppercase are exported, not needed here but for +// demonstration purposes. func Fact(n uint) uint { res := uint(1) for n > 0 { // no while loop in Go @@ -56,7 +57,7 @@ func Fact(n uint) uint { func main() { // Array literal, the `...` is used to infer its size - // If you instead left the [] empty it becomes an slice (heap allocated) + // If you instead left the [] empty it becomes a slice (heap allocated) ns := [...]uint{0, 4, 10, 1, 5, 8} for _, n := range ns { fmt.Printf("Fact(%d) = %d\n", n, Fact(n))