Ark

hex.pm VersionBuild StatusLicense

Ark is a collection of small utilities useful for prototyping, testing, and working with Elixir common patterns.

Installation

def deps do
  [
    {:ark, "~> 0.10"},
  ]
end

Plugins

Ark.Error

This module provides function to work errors as data.

Ark.Ok

This module provides base functions to work with ok/error tuples.

Ark.PubSub

This module provides a simple pub-sub mechanism.

Ark.StructAccess

This module provides a simple way to implement the Access behaviour for any struct.

Example

defmodule MyStruct do
  defstruct [:k]
  use Ark.StructAccess
end

s = %MyStruct{k: 1}
put_in(s.k, 2)

# => %MyStruct{k: 2}

Documentation

The docs can be found at hexdocs.