Skip to content

Latest commit

 

History

History
40 lines (30 loc) · 1.06 KB

README.md

File metadata and controls

40 lines (30 loc) · 1.06 KB

Kop

Download

A small coproduct library for Kotlin.

Gradle

repositories {
    maven { url 'https://dl.bintray.com/aedans/maven/' }
}

dependencies {
    compile 'io.github.aedans:kop:1.0.1'
}

Features

  • Standard coproduct type Coproduct a b = Left a | Right b
  • Coproduct typealiases up to 26
  • Coproduct.fold up to 26
  • Coproduct.map up to 26
  • Coproduct.value up to 26
  • Kategory interop

Automatic Code Generation

The code generator is located here. Note that when adding a new generator method, you must also call it from build.gradle:codegen.

To increase the number of auto-generated utilities, there is a variable called num in build.gradle. However, you will have to build and publish to another Maven repository to use this change.