Created
May 21, 2020 15:14
-
-
Save caseylmanus/6a8ece93f2010490ca97eed8c7e781f2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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