Skip to content

Instantly share code, notes, and snippets.

@rapando
Created March 23, 2022 17:27
Show Gist options
  • Save rapando/06f502094c6f8e0a76a3967ae47ce147 to your computer and use it in GitHub Desktop.
Save rapando/06f502094c6f8e0a76a3967ae47ce147 to your computer and use it in GitHub Desktop.
package main
import "fmt"
func main() {
var x = 3
var y = 5
printSum(x, y)
func() {
sum := x + y
fmt.Println("the sum is", sum)
}()
}
func printSum(x, y int) {
sum := x + y
fmt.Println("the sum is", sum)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment