官术网_书友最值得收藏!

  • Learn Scala Programming
  • Slava Schmidt
  • 215字
  • 2021-06-10 19:35:38

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: "In Scala 2.13, StringOps has been extended with option-returning methods for string literals parsing. Supported types include all numeric types and Boolean."

A block of code is set as follows:

object UserDb {
def getById(id: Long): User = ???
def update(u: User): User = ???
def save(u: User): Boolean = ???
}

When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:

scala> val user = User("John", "Doe", "jd@mail.me")
user: User = User(John,Doe,jd@mail.me)
scala> naiveToJsonString(user)
res1: String = { "name": "John", "surname": "Doe", "email": "jd@mail.me" }

Any command-line input or output is written as follows:

take
-S--c--a--l--a-- --2--.--1--3-
take
Lazy view constructed: -S-S-c-C-a-A-l-L-a-A- -
Lazy view forced: -S--c--a--l--a-- -List(S, C, A, L, A, )
Strict: List(S, C, A, L, A, )

Bold: Indicates a new term, an important word, or words that you see on screen.

Warnings or important notes appear like this.
Tips and tricks appear like this.
主站蜘蛛池模板: 峨山| 余姚市| 武胜县| 罗田县| 黄浦区| 南川市| 峨山| 彰化市| 天台县| 虞城县| 大渡口区| 靖边县| 崇阳县| 盈江县| 治多县| 青海省| 平定县| 建水县| 岑溪市| 彭州市| 新乡县| 潮安县| 阿鲁科尔沁旗| 和顺县| 都兰县| 蓬溪县| 万载县| 来宾市| 麻城市| 娱乐| 汶川县| 吉水县| 寻甸| 博白县| 承德市| 南漳县| 襄汾县| 永城市| 固原市| 敦化市| 阆中市|