Scala CheatSheet
A "Cheat-Sheet" for Scala. Under development. Click on watch to keep you informed of updates. Designed for people who are already familiar with the Scala programming language, for small reminders.
I am not a Scala professional, so please report my errors in the issues, in order to have better quality content. To read, consider each section as a separate cheat sheet, not the whole project as a cheat sheet. Thank you and have fun!
Getting Started
You can read the Cheat-Sheet by accessing this link : https://riiswa.github.io/Scala-CheatSheet/
Table of contents
- Scala Cheat Sheet
- Scala essentials
- Display and Strings
- Method definitions
- Conditional
- Pattern matching
- Exceptions
- Parametric type
- Object oriented programming
- General hierarchy of classes / traits / objects
- object
- class
- Arrays
- Declaration of array
- Access to the elements
- Iteration on the elements of an array
- Creating an array by transformation
- for/yield
- filter
- map
- sortWith
- reduce
- Arrays with a variable size
- Main collections
- Principles
- Tuples
- Map
- Option
- Either
- Lists
- Set
- Vector
- Stack
- Queue
- Range
- Streams
- Collections in detail
- Traversable
- Iterable
- Seq
- Usual operations
- Add / remove an element
- Update
- Assemblist operations
- Cast
- Operations of Iterables
- Selection and cutting
- Transformation of a collection
- Operations of Seq
- Parallel collections
- Lazy view
- Object oriented programming
- Class statement
- public, private and protected access
- public
- private
- protected
- Refine the scope of access
- Getters and Setters
- Constructors
- Nested Classes
- Anonymous Classes
- Type and this
- Transtyping
- Object
- Singleton Object
- Any Methods
- Apply and Unapply
- case class
- Inheritance
- extends
- Constructor and super-class
- override
- Abstract class
- final
- Implicit conversions
- Implicit class
- implicit conversions method
- Trait
How to contribute
Install beakerx, edit scala_cheatsheet.ipynb and Pull Requests.
Expected
- Pattern Matching
- Parametric types
- XML
- Future and Promise
- Akka actors
- Delimited continuations