mirror of
https://github.com/unknwon/the-way-to-go_ZH_CN.git
synced 2025-11-13 09:16:10 +08:00
[Typo] Fix multiple wrong single and double quotation marks between 04.6 to 06.9
This commit is contained in:
@@ -124,8 +124,8 @@ addJpeg := MakeAddSuffix(“.jpeg”)
|
||||
然后调用它们:
|
||||
|
||||
```go
|
||||
addBmp(“file”) // returns: file.bmp
|
||||
addJpeg(“file”) // returns: file.jpeg
|
||||
addBmp("file") // returns: file.bmp
|
||||
addJpeg("file") // returns: file.jpeg
|
||||
```
|
||||
|
||||
可以返回其它函数的函数和接受其它函数作为参数的函数均被称之为高阶函数,是函数式语言的特点。我们已经在第 6.7 中得知函数也是一种值,因此很显然 Go 语言具有一些函数式语言的特性。闭包在 Go 语言中非常常见,常用于 goroutine 和管道操作(详见第 14.8-14.9 节)。在第 11.14 节的程序中,我们将会看到 Go 语言中的函数在处理混合对象时的强大能力。
|
||||
|
||||
Reference in New Issue
Block a user