Home

Awesome

Datastructures for Elixir

This is a collection of protocols, implementations and wrappers to work with datastructures.

The stdlib of Elixir right now is very poor and every now so you end up using the Erlang libraries, which have different APIs from the rest of idiomatic Elixir, and on top of that they lose all the protocol goodies.

Protocols

Sequence

Counted

Emptyable

Reducible

Sequenceable

Listable

Peekable

Reversible

Contains

Queue

Stack

Set

Dictionary

Helpers

Dict

Seq

You're awful, those names are long

I know right? Just use alias.

alias Data.Set, as: S
alias Data.Set.BalancedTree, as: SBT

SBT.new |> S.add(23) |> S.add(42) # => #Set<[23,42]>