A collection of beginner-friendly Scala tutorials to help you learn and master functional and object-oriented programming with Scala.
This repository contains a series of Scala tutorials covering topics like variables, collections, functions, pattern matching, and more. Whether you're new to Scala or transitioning from another language, these tutorials provide clear explanations and hands-on examples.
- Scala installed on your machine (Download Scala)
- A build tool like
sbt(Scala Build Tool) (Install sbt) - A code editor like IntelliJ IDEA with Scala plugin or Visual Studio Code (optional but recommended)
- Clone the repository:
git clone https://github.com/D-artisan/scala-tutorials.git
- Navigate to the project directory:
cd scala-tutorials
- Each tutorial is organized in its own file (e.g.,
01_Variables.scala,02_Collections.scala). - To run a tutorial using
sbt:- Open the terminal in the project directory.
- Start the
sbtconsole:sbt
- Compile and run a specific file:
(Replace
runMain <package>.<ObjectName>
<package>.<ObjectName>with the actual package and object name from the file, e.g.,tutorials.Variables.)
- Alternatively, use your IDE’s "Run" feature if supported.
- Explore the code and modify it to experiment!
Contributions are welcome! If you’d like to add a tutorial or improve an existing one:
- Fork the repository.
- Create a new branch (
git checkout -b feature/new-tutorial). - Commit your changes (
git commit -m "Add new tutorial on X"). - Push to your branch (
git push origin feature/new-tutorial). - Open a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.
Have questions? Feel free to reach out via GitHub Issues.
Happy coding with Scala! 🚀