Aja - Data structure and utility library for Elixir


Introducing Aja, a library aiming to extend the standard library with some extra data structures and utility functions.


  • ordered maps
  • tree-based maps and sets that should be more ergonomic than :gb_trees/:gb_sets
  • exclusive ranges
  • various utility functions

Github: https://github.com/sabiwara/aja
Hex: https://hexdocs.pm/aja/

I’m still relatively new to elixir and announcing my first library feels pretty embarrassing, but watching Chris Keathley’s inspiring talk encouraged me to just go and ship my “bonks idea”. Looking forward for your feedback!


What would Elixir feel like if lists let you append or access any element efficiently, like you would do in python or any imperative language?

Clojure, which is also a functional language, makes its persistent vector one of its selling points, precisely because vectors can perform many operations in effective constant time.

This has been a tough challenge and I went through several failed attempts, but I’m happy to announce that A.Vector is now available in Aja, since version 0.4!

While there is still work to be done especially regarding optimization, the performance of this early version already shows great promise: most “enumerable” functions are much faster than erlang’s :array, and some are even slightly faster than their List / Enum's counterparts.

My motivation and hope is that vectors could make it more straigthtforward to write some of the more algorithm-heavy parts of business logic code. And maybe it can make the transition easier for beginners coming over from imperative languages and who struggle with some of the limitations of linked lists. I’m looking forward to hearing your thoughts!