Skip to content

The basics, and then some

Compare
Choose a tag to compare
@expede expede released this 14 Mar 05:11

Structs to replicate standard ADTs from languages such as Haskell.

The types are bootstrapped through a few techniques, including "empty" structs. With this approach, we can still define protocol implementations for the data types, with separate behaviours for %Nothing{} and %Just{just: 1}, for example.

Some data types (such as lists) are built-in to Elixir, and are not represented here.

Basics

Common

  • Id
  • Either
  • Maybe

Trees

  • Rose
  • Binary
  • Search

Witchcraft

  • Free
  • Reader
  • Kleisli

If there is a datatype that you would like, feel free to write one and submit a PR, or simple open an issue.

~@expede