Go 語言函數作爲實參

/* Go 語言可以很靈活的創建函數,並作爲另外一個函數的實參*/ package main import ( "fmt" ) type cb func(int) int func main() { fmt.Print("執行開始調用函數作爲參數傳遞->") testCallback(1,callback) testCallback(2, func(x int)
相關文章
相關標籤/搜索