Scala.
Functional and object-oriented Scala for Apache Spark, distributed computing, and big data engineering.
Beginner
Start here — no prior experience needed
Your First Scala Program
Run Scala with one command, see why val beats var, and read the type the compiler inferred when you did not write one.
Collections and Transformations
List, Vector, Map and Set — plus map, flatMap, groupBy and foldLeft, and why picking the wrong collection makes an O(1) operation O(n).
Case Classes and Pattern Matching
Model data with case classes and enums, take it apart with match, and let the compiler tell you which case you forgot.
Option, Either, and Try
Absence and failure as values rather than exceptions — chaining with map and flatMap, keeping the reason with Either, and why .get undoes all of it.
Functions as Values
Pass functions as arguments, return them from methods, compose them, and use by-name parameters to build your own control structures.
Intermediate
For developers with core concepts down
Traits, Givens, and Type Classes
Mix in behaviour with traits, add methods to types you do not own with extensions, and let the compiler pass arguments for you with given and using.
Futures and Asynchronous Composition
Compose asynchronous work with map and for-comprehensions, run independent calls in parallel, and avoid the mistake that makes a concurrent pipeline sequential.
Testing with MUnit and ScalaCheck
Run tests with one command, read a failure diff that actually helps, test futures without blocking, and let property-based testing find the case you did not think of.
Advanced
Production-grade patterns for experienced engineers
Generics, Variance, and Opaque Types
Write code that works for any type, get variance right so subtyping flows the way you expect, and make wrappers that cost nothing at runtime.
sbt, Packaging, and Shipping a JAR
Graduate from scala-cli to sbt, manage dependencies and modules, and build an assembly JAR that runs under spark-submit without dragging Spark along with it.