{"id":29514040,"url":"https://github.com/r8vnhill/algebraic-data-types-kt","last_synced_at":"2026-05-10T05:04:24.262Z","repository":{"id":300284841,"uuid":"1005763122","full_name":"r8vnhill/algebraic-data-types-kt","owner":"r8vnhill","description":"Kotlin examples demonstrating algebraic data types (data class and enum class) as part of the DIBS course on software library design.","archived":false,"fork":false,"pushed_at":"2025-07-12T21:45:53.000Z","size":37,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-07-12T22:24:37.208Z","etag":null,"topics":["algebraic-data-types","data-class","dibs-course","educational","enum-class","gradle","jvm","kotlin","software-library","type-safe"],"latest_commit_sha":null,"homepage":"https://dibs.ravenhill.cl","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/r8vnhill.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-06-20T19:17:41.000Z","updated_at":"2025-07-12T21:45:57.000Z","dependencies_parsed_at":"2025-06-20T21:34:29.160Z","dependency_job_id":"01a75745-7770-4102-b5cd-4fa9693360f7","html_url":"https://github.com/r8vnhill/algebraic-data-types-kt","commit_stats":null,"previous_names":["r8vnhill/algebraic-data-types-kt"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/r8vnhill/algebraic-data-types-kt","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/r8vnhill%2Falgebraic-data-types-kt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/r8vnhill%2Falgebraic-data-types-kt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/r8vnhill%2Falgebraic-data-types-kt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/r8vnhill%2Falgebraic-data-types-kt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/r8vnhill","download_url":"https://codeload.github.com/r8vnhill/algebraic-data-types-kt/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/r8vnhill%2Falgebraic-data-types-kt/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265513366,"owners_count":23780078,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["algebraic-data-types","data-class","dibs-course","educational","enum-class","gradle","jvm","kotlin","software-library","type-safe"],"created_at":"2025-07-16T13:21:44.194Z","updated_at":"2026-05-10T05:04:24.212Z","avatar_url":"https://github.com/r8vnhill.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 📦 Algebraic Data Types in Kotlin\n\n![Kotlin](https://img.shields.io/badge/kotlin-2.2.0-7F52FF?logo=kotlin)\n![Gradle](https://img.shields.io/badge/build%20tool-gradle-02303A?logo=gradle)\n[![License](https://img.shields.io/badge/license-BSD--2--Clause-blue.svg)](https://opensource.org/licenses/BSD-2-Clause)\n![Platform](https://img.shields.io/badge/platform-JVM-orange)\n[![Educational](https://img.shields.io/badge/purpose-educational-yellow)](https://dibs.ravenhill.cl)\n[![Status](https://img.shields.io/badge/status-stable-brightgreen)]()\n[![DIBS Site](https://img.shields.io/badge/website-dibs.ravenhill.cl-purple)](https://dibs.ravenhill.cl)\n\nThis repository accompanies the lessons on algebraic data types from the **DIBS** course (Design and Implementation of Software Libraries).\n\nIt includes runnable Kotlin examples demonstrating how to model both **product types** (with `data class`) and **sum types** (with `enum class` and `sealed`) in idiomatic and safe ways.\n\n\u003e[!note]\n\u003e While the course is taught in Spanish, **all code and project content is in English** to encourage accessibility and reuse.\n\n## 📖 Table of Contents\n\n- [📦 Algebraic Data Types in Kotlin](#-algebraic-data-types-in-kotlin)\n  - [📖 Table of Contents](#-table-of-contents)\n  - [🎓 Related Lessons](#-related-lessons)\n  - [🧑‍💻 Getting Started](#-getting-started)\n    - [Requirements](#requirements)\n    - [Clone the Repository](#clone-the-repository)\n  - [🛡️ License](#️-license)\n  - [🌐 DIBS Website](#-dibs-website)\n\n\n## 🎓 Related Lessons\n\nExplore the full lessons on the DIBS course site:\n\n* 📄 [Product types with `data class`](https://dibs.ravenhill.cl/docs/type-fundamentals/algebraic-data-types/records-2/kt/)\n* 📄 [Sum types with `enum class`](https://dibs.ravenhill.cl/docs/type-fundamentals/algebraic-data-types/enums/kt/)\n* 📄 [Advanced modeling with enumerations](https://dibs.ravenhill.cl/docs/type-fundamentals/algebraic-data-types/idiom-enum/kt)\n* 📄 [Sum types with `sealed interface`](https://dibs.ravenhill.cl/docs/type-fundamentals/algebraic-data-types/sealed-interfaces/kt)\n\nEach lesson includes motivation, idiomatic use cases, and annotated code examples designed to help you apply ADTs in real Kotlin libraries.\n\nMore lessons will be linked as the course progresses.\n\n## 🧑‍💻 Getting Started\n\n### Requirements\n\n- Java 11 or newer\n- [Gradle](https://gradle.org/) (optional — a wrapper is included)\n- Recommended: [IntelliJ IDEA](https://www.jetbrains.com/idea/)\n\n\u003e For installation help, see the [setup guide](https://dibs.ravenhill.cl/docs/installation).\n\n### Clone the Repository\n\n```bash\ngit clone https://github.com/r8vnhill/algebraic-data-types-kt.git\ncd algebraic-data-types-kt\n```\n## 🛡️ License\n\nThis project is licensed under the **[BSD 2-Clause License](./LICENSE)**.\n\nYou may use, adapt, and share this code freely for personal, academic, or educational purposes, as long as attribution is given.\n\n## 🌐 DIBS Website\n\nThe full course — *Diseño e Implementación de Bibliotecas de Software* — is available at:\n\n👉 [https://dibs.ravenhill.cl](https://dibs.ravenhill.cl)\n\nThere you'll find complete lessons, slides, exercises, and complementary resources (in Spanish).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fr8vnhill%2Falgebraic-data-types-kt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fr8vnhill%2Falgebraic-data-types-kt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fr8vnhill%2Falgebraic-data-types-kt/lists"}