- Functional Kotlin
- Mario Arias Rivu Chakraborty
- 233字
- 2021-06-24 19:15:20
Conventions used
There are a number of text conventions used throughout this book.
CodeInText: Indicates code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles. Here is an example: "We introduced a new BakeryGood class, with the shared behavior and state of both Cupcake and Biscuit classes and we made both classes extend BakeryGood."
A block of code is set as follows:
open class BakeryGood(val flavour: String) {
fun eat(): String {
return "nom, nom, nom... delicious $flavour bakery good"
}
}
class Cupcake(flavour: String): BakeryGood(flavour)
class Biscuit(flavour: String): BakeryGood(flavour)
When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:
fun main(args: Array<String>) { val emptyList1 = listOf<Any>()
val emptyList2 = emptyList<Any>() println("emptyList1.size = ${emptyList1.size}") println("emptyList2.size = ${emptyList2.size}") }
Any command-line input or output is written as follows:
$ kotlin HelloKt
Bold: Indicates a new term, an important word, or words that you see onscreen. For example, words in menus or dialog boxes appear in the text like this. Here is an example: "A dialog will appear that will ask whether you want to open it as a file or as a project. Click on Open As Project"
- Web程序設(shè)計(jì)及應(yīng)用
- Mastering QGIS
- Python測試開發(fā)入門與實(shí)踐
- Highcharts Cookbook
- C/C++程序員面試指南
- Advanced Express Web Application Development
- Mastering Elixir
- Swift High Performance
- C語言程序設(shè)計(jì)教程
- Python高性能編程(第2版)
- 精益軟件開發(fā)管理之道
- Spring Boot從入門到實(shí)戰(zhàn)
- 大話程序員:從入門到優(yōu)秀全攻略
- 生成藝術(shù):Processing視覺創(chuàng)意入門
- HoloLens Blueprints