Scala by Example

Scala is a multi-paradigm, static, and strongly typed language on the JVM.

Source

Hello World!

Variables

Values

Expressions

If/Else Expressions

Classes

Methods

Objects

apply

Case Classes

Functions

Traits

Type Parameterization

Algebraic Data Types

Pattern Matching

Collections

Functional Combinators

For Comprehensions

Exceptions

Option

Either

Try

Future

Typeclasses