Iota

Introduction

Iota is a tiny library for fast coproduct types with a syntax that cleanly supports the disjunction of any number of types.

Traditional coproduct implementations are implemented as binary trees or linked lists at both the type and value level. The syntax for traditional coproducts frequently becomes unwieldy as the number of disjunct types grows.

Iota coproducts are linked lists at the type level. At the value level, Iota stores the index of the disjunct value's type for quick and constant time access of the values. This syntax scales cleanly to support any number of disjunct types.

Cats vs Scalaz

Iota requires either Cats or Scalaz. If you're using Scalaz, use the "iotaz" modules and import from the iotaz package (instead of iota).

Cats friendly terminology (such as "FunctionK") is used in the iota modules while Scalaz friendly terminology (such as "NaturalTransformation") is used in the iotaz modules. If you find an issue or inconsistency, please file a GitHub issue and it will be fixed.

The Cats examples will work against Scalaz, and vise versa, so long as the library specific terminology is adjusted. Expect more Scalaz examples as the Iota library evolves.