// Chapter 26 example: this file does not compile, on purpose. step has no // receiver, so it is a plain function and not a method. Run it, read the // errors, then change the first line of step to // func (c counter) step() counter { // // Run with: go run exercises/26/06-missing-receiver.go package main import "fmt" type counter struct { count int } func step() counter { c.count = c.count + 1 return c } func main() { c := counter{} c = c.step() fmt.Println(c.count) }