kotlin 函數閉包

//閉包 //函數運行的環境就是閉包 //持有函數的運行環境 //函數內部能夠定義函數 也能夠定義類 val string = "hello world" fun makeFun():()->Unit{ var count = 0 return fun(){ println(++count) } } fun fibonacci():()->Long{
相關文章
相關標籤/搜索