- 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"
- Spring技術(shù)內(nèi)幕:深入解析Spring架構(gòu)與設(shè)計(jì)
- Azure IoT Development Cookbook
- Software Testing using Visual Studio 2012
- Python Game Programming By Example
- Instant Typeahead.js
- Hadoop+Spark大數(shù)據(jù)分析實(shí)戰(zhàn)
- 網(wǎng)絡(luò)爬蟲(chóng)原理與實(shí)踐:基于C#語(yǔ)言
- Mastering Predictive Analytics with Python
- SQL Server 2012數(shù)據(jù)庫(kù)管理與開(kāi)發(fā)項(xiàng)目教程
- Python完全自學(xué)教程
- 青少年P(guān)ython編程入門(mén)
- Mastering Android Game Development
- R語(yǔ)言:邁向大數(shù)據(jù)之路(加強(qiáng)版)
- Java EE項(xiàng)目應(yīng)用開(kāi)發(fā)
- iOS Development with Xamarin Cookbook