Scala Syntax Examples

Information

This repository contains various Scala syntax examples.

Each syntax example has a corresponding printInfo method that is invoked and will print information to the console.

Instructions

The following repository assumes you hava Java, Scala and SBT all installed.

In order to run the application via command line:

sbt run

Alternatively you can run using your Integrated Development Environment (IDE). For example in IntelliJ you can perform the following:

  • Right click the AppDemo file
  • Choose Run 'AppDemo'

Structure

Much of the examples here can be explored in further detail on the Scala Tour.

The code examples shared here are not exhaustive so definitely recommend exploring the Scala tour as well.

https://docs.scala-lang.org/tour/tour-of-scala.html

  1. Types
  2. Functions and Methods
  3. Classes and Objects
  4. Collections
  5. Pattern Matching
  6. Currying