Created
April 28, 2022 05:24
-
-
Save monkrus/7ae46a521af0f212217984edfce2b23c 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 material func(x, y int) int | |
func main() { | |
var explosion material = func(elemX, elemY int) int { | |
return elemX + elemY | |
} | |
boom := explosion(2, 4) | |
fmt.Println("The result is a huge explosion that has the radius of", boom, "meters") | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment