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: "The base class is specified using extends and then all traits are added using the with keyword."

A block of code is set as follows:

class MultiplierIdentity {  def identity: Int = 1}

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

Error:(11, 8) object Clashing inherits conflicting members:  method hello in trait A of type ()String and  method hello in trait B of type ()String(Note: this can be resolved by declaring ...

Get Scala Design Patterns - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.