Skip to content

Instantly share code, notes, and snippets.

@caseylmanus
Created May 21, 2020 15:14
Show Gist options
  • Save caseylmanus/6a8ece93f2010490ca97eed8c7e781f2 to your computer and use it in GitHub Desktop.
Save caseylmanus/6a8ece93f2010490ca97eed8c7e781f2 to your computer and use it in GitHub Desktop.
package main
import "fmt"
type printer func(string)
func main() {
do("hello world", print)
}
func do(s string, p printer){
p(s)
}
func print(s string) {
fmt.Println(s)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment