Skip to content

Latest commit

 

History

History
69 lines (44 loc) · 2.95 KB

README.md

File metadata and controls

69 lines (44 loc) · 2.95 KB

Kotlintapas

This repository is a collection of small problems to illustrate all the cool shit that you can do with Kotlin

Requirements

brew cask install java11

Structure of the repository

Each folder in the source contains an exercise, with a README file describing what to do.

Running the tests

Tests can be run from IntelliJ or in the console by using:

./go test

Solutions

Switch to the solutions branch if you want to see the solutions for the exercises as well.

List of exercises

The exercises in bold don't have a concrete exercise to implement, they are more of a showcase with some code that can be played with.

Some exercises use concepts explained in other tapas. The dependsOn will help you visualize that. Other than that, there is no intended order. Follow your curiosity!

Classes

  • dataclasses: Get to know data classes, the alternative to Lombok
  • properties: Represent custom fields in your classes using properties
    • dependsOn: dataclasses
  • destructuring: Destructuring, a way of accessing multiple attributes at the same time
  • inheritance: How does inheritance look like in Kotlin?
  • delegation: Forwarding done easy
    • dependsOn: properties
  • sealed classes: Closed hierarchies

Functions

Collections

  • ranges: How to manipulate ranges
    • dependsOn: operators
  • Lambdas: Expressing your code in terms of lambdas
  • Grouping: Grouping collections

Other